Facebook Integrate

I am trying to integrate facebook with suitecrm 7.9 but unable to get the output. Facebook link is activated on home page, when I click on that link it redirect me to again home page but without logged in into facebook. Moreover, no CSS, its like crashed page.

The absence of CSS is a sign that you probably have broken permissions. I am supposing this is a new install.

You should start by fixing that before any other concerns - if you have broken permissions, random things will fail in a random manner.

Can you post the results of this command (type it from your SuiteCRM directory, the place where you have files like index.php and config.php).

ls -al

Hi, Thanks for the revert. I am using this on windows. how can I check the permission and take output?

In addition to the first query, I have created facebook app and configured in suitecrm as well. when click on the link, earlier it was throwing error for Read_stream and redirecting me on my home page without CSS (just text, non clickable), I have changed read_stream parameter as directed on facebook permission page then error is gone but the landing page is same without CSS and the facebook link is showing as same like login to facebook.

I don’t know exactly how to set permissions on Windows, but make sure you get that right before worrying about Facebook problems, or any other problems. If you don’t see your CSS properly, SuiteCRM is failing to load some files, so it will just break in random ways.

Basically you need to insure that your Web server user (if on IIS, it could be IUSR_computername) is allowed to read and write the SuiteCRM folder and subfolders.

Then do a Quick Repair and Rebuild, and try again.

HI

There is some confusion, during the normal browsing CSS is working fine. but when I click on facebook and it redirect after authentication process the page reloads without CSS. I dont thing so there is any problem in permission while normal browsing of suite modules or pages. Pl. help me in configuring facebook. I am sure i am doing some mistake in facebook configuration that is why the result are not in-line.

Thanks and regards

Pl. check system status attached.

Try to see your browser’s Developer Console to check for any errors loading files.

And check your suitecrm.log also. We need more clues to understand what’s going on.

Also, I’ve never seen this Facebook integration in action, so if you explain in more detail where you go, what you click, in what sequence, that will help. At this point I really don’t know what you’re talking about, sorry…

Ok,

my sugurcrm.log is flooded with following since day one.

06/06/17 17:57:20 [13704][-none-][FATAL] Query Failed: SELECT id FROM aow_workflow WHERE aow_workflow.flow_module = ‘ACLActions’ AND aow_workflow.status = ‘Active’ AND (aow_workflow.run_when = ‘Always’ OR aow_workflow.run_when = ‘On_Save’ OR aow_workflow.run_when = ‘Create’) AND aow_workflow.deleted = 0 : MySQL error 1146: Table ‘suitecrm.aow_workflow’ doesn’t exist

Installation.log file is showing last four lines as below.

2017-06-06 12:33:16…DBG: save currency
2017-06-06 12:33:16…Save user settings…
2017-06-06 12:33:16…DBG: SugarThemeRegistry::getDefault
2017-06-06 12:33:16…DBG: require modules/Users/Save.php
2017-06-07 06:29:16…installerHook: Could not find custom/install/install_hooks.php

when click on link facebook login no logs been generated under suitecrm.log file.

upgrade.log is showing following

Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: update logic hook and entry point registry in custom/modules/Connectors/connectors/sources/ext/rest/facebook/facebook.php for module: [module is not set]
Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: /custom/modules/logic_hooks.php file does not contains “custom/modules/Connectors/connectors/sources/ext/rest/facebook/facebook.php”
Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: update logic hook and entry point registry in custom/modules/Connectors/connectors/sources/ext/rest/facebook/language/en_us.lang.php for module: [module is not set]
Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: /custom/modules/logic_hooks.php file does not contains “custom/modules/Connectors/connectors/sources/ext/rest/facebook/language/en_us.lang.php”
Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: file exists and is not removed: custom/modules/Connectors/connectors/sources/ext/rest/facebook/mapping.php
Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: update logic hook and entry point registry in custom/modules/Connectors/connectors/sources/ext/rest/facebook/vardefs.php for module: [module is not set]
Thu, 08 Jun 2017 12:10:12 +0530 [UpgradeWizard] - upgrade custom cleanup: debug: /custom/modules/logic_hooks.php file does not contains “custom/modules/Connectors/connectors/sources/ext/rest/facebook/vardefs.php”

After clicking on facebook link browser developer options shows following

GET
facebook/dialog/oauth [HTTP/2.0 302 Found 302ms]
GET
/php/suitecrm/index.php [Mixed Content]
[HTTP/1.1 200 OK 2901ms]
GET
/php/suitecrm/cache/include/javascript/sugar_grp_yui_widgets.js [Mixed Content]
[HTTP/1.1 200 OK 0ms]
GET
/php/suitecrm/include/javascript/dashlets.js [Mixed Content]
[HTTP/1.1 200 OK 0ms]
GET
/php/suitecrm/include/javascript/popup_helper.js [Mixed Content]
[HTTP/1.1 200 OK 0ms]
ReferenceError: YAHOO is not defined[Learn More] sugar_grp_yui_widgets.js:2:1
ReferenceError: SUGAR is not defined[Learn More] dashlets.js:35:1
ReferenceError: SUGAR is not defined[Learn More] index.php:1850:1
ReferenceError: SUGAR is not defined[Learn More] popup_helper.js:82:1
ReferenceError: enableQS is not defined[Learn More] index.php:1968:1

following is the debug log after clicking on facebook link.

Hope above information is enough to trace the glitch. Pl. help me out.

I am very suspicious of those fatal errors in your log about the “versions” table.

I checked my 7.8.0 system, it has a table in MySQL called “versions”.

but the 7.9.1 does not have that table.

I wonder why your system still has code trying to use that table, when that table seems to be deprecated… do you have any add-on module installed? Or some code customizations?

Hi, thank for quick revert.

I do have installed add-on modules as following,

=====================================
MeetingMapReminder Commercial Give Away!

module
1.2
06/15/2017 06:41pm
Meeting Map Reminder by email everyday!

Asterisk SugarCRM Connector

module
2.3.0.9 for v6.x
06/16/2017 01:55pm
Integrates Asterisk telephony features into SugarCRM.

User_Activities

module
1.1.3
06/16/2017 12:59pm
Installs a custom module that allows you to view all Activities in a single List View.

Dynamic Dropdown

module
1.0.1 Beta
06/16/2017 01:54pm
New field Dynamic Dropdown

Fab Tools - Not followed Opportunities dashlet

module
2.0Beta
06/16/2017 01:18pm
A dashlet which gives the list of opportunities not followed in last six months(default)

I have changed the file facebookclass.php as below.

=====================================
function get_login_url($url){
$params = array(
‘scope’ => ‘user_posts, publish_actions’//‘read_stream, publish_stream’

        );

=====================================

the suspicious behavior may be due to sugar CE and Suite on the same server. I had installed sugar CE and then installed Suite.

Maybe you can try a “Find in files” inside your custom directory, looking for the string “versions”. That might help you discover exactly which add-on can be using that table.

When you start to browse your crm app, is the browser on https ?
When you login to facebook and get redirected back to the crm, is it on http ? or https?

Hi

My browser is on http and not on https.

when I mouse over on facebook link it is showing https.

when page gets redirected, it is on http

hi

PFA list of files which shows under search for string version

@sheth.priyank if you want to go hunting for the source of that attempt to access the “versions” table, you’ll have to do a more detailed analysis (and I can’t do it for you, at a distance…).

You’ll have to look into the code and see if it’s actually a reference to the SQL table, or just the word “versions” in some other context.

If it’s really a use of the table, you could try disabling that add-on or those custom modules to see if the problem goes away.

Another way to do it would be to create the versions table, and give it a content similar to what it had in the previous versions.

ok, thanks.

will it solve my facebook problem?? or for facebook I need to do it other research / modification.

I have no idea if it will solve your Facebook problem, but if you say those FATAL errors are in your log when you press the Facebook button, then it’s likely.

Anyway, you always need to clear all FATAL errors from your installation, otherwise the application could break in a million ways, because some block of PHP is interrupting its execution. It’s not even worth troubleshooting other problems while you still have FATAL errors in your logs, I would say.

ok, i will try to resolve all fatal error in log file and then try. thanks.