Topic-icon Custom Open Graph Action : Manual vs. On Page Load

Active Subscriptions:

None
11 years 1 month ago #31759 by lishig
n
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31761 by lishig
I did not do this (had mentioned that earlier) from you other post I was following. Could that be part of the problem? Pretty blue box
Edit the /libraries/sourcecoast/openGraphPlugin.php file. Around line 200, you'll see:
Code:

//TODO: Replace this with the behavior framework call used in J2.5+ (after J1.5 support is dropped)

if ($actionAdded)

{

JHTML::_('behavior.mootools');

// Include our CSS file for styling the popup

$doc = JFactory::getDocument();

$doc->addStyleSheet(JURI::base() . 'components/com_jfbconnect/assets/jfbconnect.css');

}

Remove the if statement and { } altogether, so it looks like:
Code:

//TODO: Replace this with the behavior framework call used in J2.5+ (after J1.5 support is dropped)

JHTML::_('behavior.mootools');

// Include our CSS file for styling the popup

$doc = JFactory::getDocument();

$doc->addStyleSheet(JURI::base() . 'components/com_jfbconnect/assets/jfbconnect.css');
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31765 by lishig
Got this! finally...
File Attachment:


I've had display errors on front end turned on since last night. The only thing different that triggered this is that I turned off action/objects configured for 'On Page Load'

The only action/objects on the page are for Manual trigger.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31767 by lishig
tried it a couple ways. object settings that triggered that error:

custom object, type 'article', built-in both on and off, query code: option=com_content view=article id=88
The topic has been locked.
Support Specialist
11 years 1 month ago #31771 by alzander
Once we get the code working for the button, it's very easy to update it to use the current page, instead of having to hard-code it. I'd rather not add more complexity to the situation until we confidently get the button working.

As for the Mootools change you made to the code, yes, that's correct. I forgot that we don't load it unless required. Since you're adding the button yourself, we (JFBConnect) can't detect that it's necessary to load Mootools. Sorry about that. With the next (v5.1) release, we're planning to have a tag that will generate the Javascript and add Mootools. It will also detect if the action has already been triggered and show a different image (if desired) to say something like "You Digged This" instead of "Dig this".

The error that's being thrown is strange. It's coming from the Content Open Graph plugin. Are you using the Content plugin on for that page? Is the object or action type you created one from the Content (Article) types, or are you just using the Custom object type (like you describe in your last post)? If you're not using it, I'd recommend ddisable the Open Graph Content plugin (for now) so that just the custom plugin is loaded.

If you need the Content plugin, try re-ordering it in the plugin manager so it's either last, or first. Try both ways. One of those will likely fix that Fatal Error.

Keep us posted on what you find. You're definitely stretching the bounds of our Open Graph integration. What you're looking for is definitely possible, but the custom stuff is definitely unique to each site and not something we've fully fleshed out as much as the built-in features (reading, joining groups, etc). We'll get you going though!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31772 by lishig
This is strange. I went to the page that lists all my timeline activity. Deleted almost all since I currently do not have that access in Activity Log. Now I no longer get the fatal error code, but rather a post to the timeline but the object the button triggers shouldn't be happening.

It appears that the Page Load Action is allowed to be triggered by the Manual Dig It button.

Configuration is for two sets 1. Upon Page Load 2. Manual button

1. Upon Page Load relations. Dig It On Page Load : Like Community Category
Action is named "Dig It On Page Load" It is a custom action configured to allow multiple and trigger on page load
Object is named "Like Community Category" It's configuration panel reads: Extension:content, Layout:article, Object Type:article, Built-in Facebook Object is NOT checked, set to the Community category


2. Manual button relations. Dig It Manual : Dig It for Diggers MAPP (or) Dig It for SS
Action is named "Dig It Manual" It is a custom action configured to allow multiple and trigger manually
Objects (two) are named "Dig It for SS" and "Dig It for Diggers MAPP"
They were created using Custom Object Type. On the configuration panel reads: Extension:custom, Layout:custom, Object Type:article, Built-in Facebook Object is NOT checked.

So here's the deal now:
1. I click on the Dig It button
2. I get a post to timeline notification blue box
3. I go to timeline activity and it shows that Dig It On Page Load : Like Community Category posted.
That button is not connected to those action/objects at all.
Should have read: Dig It Manual : Dig it for SS (or Diggers MAPP second test page)

www.diggersdelight.com/index.php/community/culture/diggers-mapp
www.diggersdelight.com/index.php/communi...rdays-art-happenings

Stranger still: I can trigger either an error code or a successful post on Diggers MAPP and Second Saturdays

From the above settings troubleshot the following, always returning to original two sets being turned on after finishing-

a. Turned off (page load) Object "Like Community Category", button no longer works, error code (nothing) posts to front.

b. Turned off (page load) Action "Dig It on Page Load", button no longer works, error code (nothing) posts to front.

c. Turned off (button) Action "Dig It Manual", button works (shouldn't), sometimes error code, sometimes times posting but oddly from Dig It On Page Load : Like Community Category wait long enough now the page load triggers is reporting an error.

d. Turned off (button) Object "Dig It for SS" and "Dig It for Diggers MAPP", button works (shouldn't), sometimes error code, sometimes times posting but oddly from Dig It On Page Load : Like Community Category wait long enough now the page load triggers is reporting an error.

Why the button's working, then not, but always posting through the wrong action/object relation is beyond me.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31779 by lishig
Well, whittled it down. I think.
I can use the button/link in this situation:

My "upon page load'' action/object set is triggered by a click on the button within an html module using the javascript (0) code filled with full url. Appears to consistently work right now.

Action is custom, set to 'upon page load'
Object is a content-article, object type article

I guess if I set the page load to a high number then that would work.

You mentioned above that there is a way to set that html module code to trigger on whatever page it is on. What is that code?

Sorry, for the length of this thread. Just trying to figure it out.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31785 by lishig
Okay, I'm starting to annoy my own self and fear confusing anyone who may read this thread. Feel free to delete any of my posts to avoid confusing others. I think I found another combination that appears to work more descriptively for manual triggers and will only assume the fatal error codes earlier were operator error on my part with a misconfiguration.

Manual Trigger of link:
My custom 'digs' action set to a very long page load timer also works with a custom object that is Extension:custom, Layout:custom, Object Type: article, Built-in Facebook object checked with the URL query parameters. This works only if I turn off the Content-Article object that was set to the category where this particular page resides. Prior, I had that Content-Article object turned on at the same time and that was apparently conflicting with the Custom-Custom Article object.

Again, feel free to edit/delete this post to avoid confusing others.
Thanks.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31786 by lishig
Still if you do have any tips on the javascript code for the html module that can trigger whatever page it is on that would be a great help. As it is, I'm looking at making a module for each page and that will be a chore.

Thanks again.
The topic has been locked.
Support Specialist
11 years 1 month ago #31788 by alzander
Lisa,
No problem for the messages. We don't delete messages unless requested to. The point of a public forum is for others to see issues and the flow of how to get to a solution.

First off, to use the current URL in the script, try changing the Javascript to:
jfbc.opengraph.triggerAction('234',location.href);
The location.href should use the current URL in the address bar for the action and make your life easier. Again though, if that causes problems, try with a hard-coded URL just so we're testing less stuff at once.

With that, it sounds like you have a Custom Action / Custom Object pair that seems to be working when the content plugin is disabled, is that correct? Are you seeing any other issues.. other than wanting the URL to be dynamic than that (as noted above).

Obviously, I'd love to help you get the Content plugin functioning as well.. but this is where we need to get a known-working configuration and then add more plugins/features as we go. That will make it much, much easier to diagnose what could be going wrong when we add features to the mix.

Keep us posted on anything you find and we'll gladly keep working with you on this!

Thanks,
Alex
The topic has been locked.