Topic-icon OpenGraph Plugin has a mysql error for some article urls

Support Specialist
Alright.. so first off, we tested again while using our brains, and we're not getting a 404 error. I blindly copied the relative URL you posted above into my Joomla 3.8 site and yeah, of course it gave a 404 error. When testing with a real article in the default Joomla install and adding any SEF alias, like id=3:some-crazy-alias, the page loads properly without any errors.

I logged into the admin area of your site to understand more as well as tried some modifications through FTP to debug things. However, none of the changes I made through FTP had any effect. For example, in the opengraph/content/content.php file, I added the following in the findObjectType function:
print_r($queryVars);exit;
That should print things out and exit further execution.. leaving a blank white page with whatever is in $queryVars. Unfortunately, the page loaded as if nothing changed.

Do you have some sort of caching or other feature on the site that would be skipping the changes I'm making? Without being able to debug and diagnose things, there's not much headway I can make to even reproduce the error. What I was hoping to do was:
* Remove the line of code you implemented
* Verify the error happened
* Turn of SEF on the site. Check if the error goes away
* If so, then re-enable SEF and start disabling parts of JReviews to see if that fixed the problem
* If the problem goes away, it means there's some interaction with jReviews specifically causing the problem. We may need to get them involved to help fix or help get our subscription upgraded.. as noted though, JReviews is encrypted so there may be only a limited amount we could do to fix it.

Feel free to try the above or help us understand how to make changes in FTP apply.

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

None
I only have the Joomla cache plugin enabled which clearing the cache should have rerun the php pages. I have disabled the plugin for now while we test.

I also commented out my change so you should see the error now. I'll PM you a link to a regular blog post (not a JReviews Listing (which is also an article) that will produce the error.

I also turned off the Joomla SEF plugin and JReviews SEF plugin (just temporarily cuz the site needs them active) and the error was still produced.

Tom
The topic has been locked.
Active Subscriptions:

None
Any word on this?
The topic has been locked.
Active Subscriptions:

None
The topic has been locked.
Support Specialist
We just had some time to investigate this further. I'm still unsure why or how that URL is being generated, but here's what we've found.

On the URL with an id=article, these are the query parameters that Joomla is finding:
Array ( [id] => article [option] => com_content [Itemid] => [view] => article )
On the correct article, the parameters are:
Array ( [Itemid] => 158 [option] => com_content [view] => article [id] => 284 [catid] => 20 )
Obviously, that id should be a number and not 'article', as you noted above.

The preferred solution that we've come up with is similar to yours but to do the following check:
if (!is_int($id))
			return false;
That will solve the issue if any other word comes in, not just 'article'.

We'll include a similar fix in the next release of JFBConnect. I hope that helps get things going for you, but if you need anything else, just let us know.

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

None
Thanks for looking into the issue and including the fix.
The topic has been locked.
Support Specialist
8 years 7 months ago #62988 by mel
I've checked the new code in for the next release. If you encounter the error again or any similar problems, please let us know.

-Melissa
The topic has been locked.