Hi, I installed the Portal2 and get the following Errors displayed on the Login page

I confirmed that the Login.js files do not exsist on the github
got what the logic is
Setras,
Facing same issue. Could you provide how you resolved this issue.
Thanks
Garland
Hi Garland,
like YF the Portal allows you to load custom JS files. The log display is just informational and can be swiched off in the config.php file
$config['debugConsole'] = false;
Best, Stefan
Thank you.
Stefan, hate to be pain, but not rocket scientist here. got everything rolling but when I hit enter I receive following response back:
_The requested URL /yetiforceapi/webservice/Users/Login was not found on this server
It appears my tree is correct however there is folder "portal" in webservice that contains users and logins.
Am I misconfiguring a config file.
any thoughts appreciated.
thanks
The YF webservice requires rewrite rules setup on your web server.
For Apache YF ships with the required .htaccess files
On Nginx these are the rules I'm using
rewrite ^/api/webservice/(.)/(.)/(.)$ /api/webservice.php?module=$1&action=$2&record=$3 last;
rewrite ^/api/webservice/(.)/(.)$ /api/webservice.php?module=$1&action=$2 last;
rewrite ^/api/webservice/(.)$ /api/webservice.php?action=$1 last;
There is a test script you can use to test if your YF webservice is correctly configured.
https://github.com/YetiForceCompany/YetiForceScripts/tree/master/YetiREST
just saw that your missing a "/"
_The requested URL /yetiforceapi/webservice/Users/Login was not found on this server
should be
_The requested URL /yetiforce/api/webservice/Users/Login was not found on this server
Setras,
Got everything working thanks to your guidance, with one issue. Get post return of invalid API key.
Is this apache2 issue on my end or something in configurations. The API key is in the config file
but do I require something else.
Thanks
the API key is configured in YF
https://gitstable.yetiforce.com/index.php?module=WebserviceApps&view=Index&parent=Settings&block=5&fieldid=100
use
Name value in $config['serverName']
Password value in $config['serverPass']
Key value in $config['apiKey']
Login Email/password must match record in YF
https://gitstable.yetiforce.com/index.php?module=WebserviceUsers&view=List&parent=Settings&block=5&fieldid=106
Stephan, thanks for everything thus far. Still have same issue but will tell you what works.
The below responses are for the same login/pw
1.Using firefox poster and url of portal with credentials I get status 200 ok when hitting post.
2.Using firefox poster and url of crm with credentials I get status 200 ok with access-control-allow-methods GET,POST,PUT,DELETE.
3.When I use url of http://xxx.xxxx.com/api/Webservice/Methods-- I receive status 401 unauthorized with the following message:
{"status":0,"error":{"message":"Wrong Credentials","code":401}}
Looking at yetiforce mysql database table for portal/users everything seems jake.
So the question becomes, am I missing something in the webservice/config ini files.
Thanks
Garland122
first you have to find out if your problem is the portal or YF installation
$enabledServices = [
'dav',
//'webservices',
'webservice',
];
DAV
$enableBrowser = true;
$enableCardDAV = true;
$enableCalDAV = true;
$enableWebDAV = false;
Webservice config
$API_CONFIG = [
'ENCRYPT_DATA_TRANSFER' => false,
'AUTH_METHOD' => 'Basic',
'PRIVATE_KEY' => 'config/private.key',
'PUBLIC_KEY' => 'config/public.key',
];
/--------------------------------------------------------

For me, the default .htaccess appears to be wrong. The URL needed "api" added before "webservice" in the rewrote rules:
RewriteRule ^api/webservice/(.*)/(.*)/(.*)$ webservice.php?module=$1&action=$2&record=$3 [QSA,NC,L]
RewriteRule ^api/webservice/(.*)/(.*)$ webservice.php?module=$1&action=$2 [QSA,NC,L]
RewriteRule ^api/webservice/(.*)$ webservice.php?action=$1 [QSA,NC,L]
How did you guys even get Portal 2 to install? I have tried everything and there is no install.php script to actually install it. Tells me I have to use composer and I have no clue how to do that? Any help would be much appreciated. Thanks in advance.
curl -sS https://getcomposer.org/installer | phpphp composer.phar install@setras Awesome man, thanks so much. I'll let you know the end result once I do it. Really appreciate it. Greetz :)
@setras Ok so I finally got around to trying to do this. This is the error I keep getting:
Problem 1
- This package requires php >=5.6.0 but your PHP version (5.4.16) does not satisfy that requirement.
Problem 2
- Installation request for guzzlehttp/guzzle ^6.3.3 -> satisfiable by guzzlehttp/guzzle[6.3.3].
- guzzlehttp/guzzle 6.3.3 requires php >=5.5 -> your PHP version (5.4.16) does not satisfy that requirement.
The funny thing is my PHP Version is 7.1.26 and I'm not using 5.4.16 that it says I am. Makes no sense. Any suggestions?
@acsinsurancegroup The current verion of the Portal is broken, I therefore created a repository at https://github.com/setras/Yetiforce-Portal2-preinstalled with a working version that has all dependencies installed. You just need to copy it to your webserver and adjust the configuration.
That you get the PHP version error ist strange. I included a file 'phpinfo.php' in the repository that allows you to check the working php version.
@setras Hey there sorry for the delay, been extremely busy. Ok, so I got all of the files copied and setup the config. It loads up and does give me a login prompt. The log shows it's missing two login.js files that are not in the directories, so I turned those off in the config just so it wouldn't annoy me.
Also, is this for the old CRM version because I'm using the 4.4.0 Complete Version. The API key in the portal is shorter than the one in the CRM config file if that's the API key I'm supposed to even use. When I try to create a Portal user in the main systems area under Integration and Web Service Users in the box that shows up in Server it only says select an option and no server shows up.
Any suggestions on getting the two systems to see each other and API correctly assuming this Portal works with version 4.4.0?
@acsinsurancegroup YF has a two level security for the webservice API
The Portal works with Versions => 4.2.0
In order to troubleshoot the API communication I suggest you enable logging on both sides
Important! - You need to enable the CRM webservice by setting the following variables in config/api.php
$enabledServices = [
//'dav',
//'webservices',
'webservice',
];
$enableBrowser = true;
See from above posts https://github.com/YetiForceCompany/YetiForceCRM/issues/5295#issuecomment-335638992 how to troubleshoot the connection.
FYI - Webservice on https://gitstable.yetiforce.com is no longer working
Also make sure you've set the correct web server rewrite rules. See
https://github.com/YetiForceCompany/YetiForceCRM/issues/5295#issuecomment-334936284
https://github.com/YetiForceCompany/YetiForceCRM/issues/5295#issuecomment-410454488
@setras You're amazing man. Thanks so much for your assistance. I got it working with the latest 5.0 to boot. It's not like the old portal where you could give a client access to just some areas for collaborative purposes. This portal is like a complete simplified version of the whole system. Is there a way to turn off modules that you don't want clients messing with?
Also, why would we want a client creating contacts, accounts, leads etc.?
Regarding this which I have not done yet: Also make sure you've set the correct web server rewrite rules. See
Do I put that in the Portal .htaccess file or the main system?
Again, thanks for everything man. Would of never got this far without yah. Greetz
@acsinsurancegroup great to hear that I could help and you got it working.
If it is working then the web server rewrite rules are correct und you can disregard this point.
The portal inherits the access rights from the CRM user defined under configuration > Integration >Web service - users. Therefore you can define the available modules and capabilities in the CRM permission settings.
My client is a non-profit insolvency consultant company and they use the portal for two different audiences
What I like about the new portal is that it follows the CRM programming principles and therefore it is quiet easy to extend and to customize. The same is true for the CRM Webservice API.
@setras Yes sir indeed. Bravo sir, many many many thanks to you :)
That makes sense. I'll setup a client Role and profile and allow access to only the modules that clients should be accessing for collaboration.
Yes it's an amazing system. Very well thought out and rock solid performance.
Do you know how to sync Google and Outlook calendars by chance? That is my next must tackle project.
@acsinsurancegroup
YetiForce has a built-in integration with CalDAV [http://sabre.io/], every device [eg. Android, iPhone] or software [eg. Thunderbird, Outlook] can connect to YetiForce as long as they support this format.
Here are the sync clients I use
YF Calendar DAV URL: https://xxx.com/dav.php/calendars/[CRM Username]/YFCalendar/
You need to enable the CRM dav service by setting the following variables in config/api.php
$enabledServices = [
_'dav',_
//'webservices',
'webservice',
];
/* +**** DAV ***** */
$enableBrowser = true;
_$enableCardDAV = true;
$enableCalDAV = true;_
$enableWebDAV = true;
The user login is configured under Software configuration > Integration > DAV Applications
useful Information
https://github.com/YetiForceCompany/YetiForceCRM/issues/9203
https://github.com/YetiForceCompany/YetiForceCRM/issues/4393
https://github.com/YetiForceCompany/YetiForceCRM/issues/3064
@setras Thanks again man. Wow, that looks painfully difficult. I did enable the Dav in the config/api.php file and setup a user in the CRM under DAV Applications and successfully logged in. However, I have no clue how to do the rest.
My team uses primarily Outlook 365 Calendar so trying to sync with that is the goal. We are wanting to be able to add calendar events within the CRM and have them show up in Outlook and vice versa.
In your reply above when you mentioned the clients you use and this:
Outlook - https://caldavsynchronizer.org/
Do I need to download the client and set it up on my server or is there a web connect feature that would allow me to do that without adding anything else on the server?
Thanks in advance :)
@acsinsurancegroup the reason why there is another user setup is to avoid changing the local mail client settings ever time the user changes his CRM passowrd.
https://caldavsynchronizer.org/ is an Outlook add-on, therefore you have to download it to your computer and run the installation. After that you will see new tab called 'CalDav Synchronizer' in Outlook and under it in 'Synchronization Profiles' you can configure the connection settings.
IMHO this technology is only visible when you have control over the users computer otherwise it becoms an administrative nightmare. This happen to me. My client works with volunteers and has no control over what computer they use. We had everthing from Apple, Linux, all Windows versions and erver possible mail client.
My clinet uses Office 365 as well and therefore we decited to develop a direct O365 server to CRM server synchronisation module. Unfortunately after implementing the Sharepoint functionality they run out of money, depending soley on donations, before I could complete the authentication and calendar.syncronisation.
@setras Thanks for the input man. That all makes sense. I guess in the end it may be easier than I thought. Since it's just a simple download and install on crappy Windows (lol, I hate Windows) and an addon into their garbage Office Suite. All I have to do is have our people use their desktop versions of Outlook (which we all have) and setup up their CalDav user accounts and setup their Syncs and theoretically we should be good to go right?
Will this allow us to for example if I add a calendar event in my Outlook, will it automatically push it to the CRM and vice versa if I add an event into the CRM will it push it into my Outlook calendar?
Sorry about your almost success with 365 not working out. If you ever do develop it, I would be highly interested as well. Thanks for all your help and I look forward to your next response. Have a great weekend!
@acsinsurancegroup
your welcome and good luck
@setras Well that's good to hear. Unfortunately it doesn't seem to work. It's getting a connection and I'm getting successful test results. However, I have tried adding test meetings to the calendar in both Outlook and the CRM and neither show up after Sync. Any suggestions and or possible settings I should check or change?
@acsinsurancegroup the synchronization on the CRM site is done by a cron task every 5 minutes.
@setras Yes sir my cron is working. However, that task of course isn't. Why, just my luck. It's always something and always seems to be exactly what I need to work. See screenie.

@setras Also my apologies man if I seem frustrated with the process. Trust me it has nothing to do with you as I wouldn't even be this close had it not been for you man. I just know I'm so close, but so far at the same time if that makes any sense :) Thanks for all of your awesome help.
@acsinsurancegroup
if you have any problems, create a new issue because the current issue concerns something else
attach server logs because your snapshot does not show error in crm
@acsinsurancegroup , as @mariuszkrzaczkowski commented he needs the logs from the CRM server.
You can enable logging by setting the following variables in
config/debug.php
'LOG_TO_FILE' => true,
'DAV_DEBUG_EXCEPTIONS' => true,
'DAV_DEBUG_PLUGIN' => true,
Please open a new issue and mention myself and @mariuszkrzaczkowski so we get a notification.
BTW - you're luky that Mariusz got involved, he is the YF Guru and if he can't help you get it working than nobody can.
@mariuszkrzaczkowski @setras Thanks guys, greatly appreciate your help. Marius, I created a new issue as you requested and tagged you and setras in the new issue.
@setras Sweet man, thanks so much as always. Yes, he seems to be the man from all the posts I've seen. Glad the expert is on the case. Really appreciate all you did bro, I would be screwed without your help. You're awesome!
Ubuntu 18.04
apache2
php 7.3
https://crm.domain.com
https://portal.domain.com
enabled dav, webservices,webservice
Created the webservice
created profile then user
then web service user.
config.php
/**
When I try to login
The requested URL /webservice/Users/Login was not found on this server.
I have setup the @setras package.
I do not no much about htaccess but the one in my portal public_html has something with php5
Also when I Rename it , I can go to crm.mydomain.com/api/webservice
What am I doing wrong ?
It seems you have a problem with your apache config. The portal requires rewrite rules to be defined in the apache config for the CRM. These rules are defined in the .htaccess file.
What is your crm web root folder defined in apache? Default is [YF CRM directory]/public_html
Is sounds like you are using the main YF CRM installation directory as your apache web root folder. In this circumstance you will need to adjust the apache rewrite rules.
create a .htaccess file in the root YF installation directory an add the following lines
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^api/webservice/(.*)/(.*)/(.*)$ webservice.php?module=$1&action=$2&record=$3 [QSA,NC,L]
RewriteRule ^api/webservice/(.*)/(.*)$ webservice.php?module=$1&action=$2 [QSA,NC,L]
RewriteRule ^api/webservice/(.*)$ webservice.php?action=$1 [QSA,NC,L]
portal.mydomain-le-ssl.conf.txt
crm.mydomain.gr-le-ssl.conf.txt
I use only ssl for both sites. Do I have to create the .htaccess file?
Thanks in advance.
OK.
I added
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
in mycrm.conf disable enable site and in my portal I get Wrong credentials . I think I am getting close.
Most helpful comment
@acsinsurancegroup , as @mariuszkrzaczkowski commented he needs the logs from the CRM server.
You can enable logging by setting the following variables in
config/debug.php
'LOG_TO_FILE' => true,
'DAV_DEBUG_EXCEPTIONS' => true,
'DAV_DEBUG_PLUGIN' => true,
Please open a new issue and mention myself and @mariuszkrzaczkowski so we get a notification.
BTW - you're luky that Mariusz got involved, he is the YF Guru and if he can't help you get it working than nobody can.