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

Active Subscriptions:

None
6 years 6 months ago - 6 years 6 months ago #62836 by eSilverStrike
I am using Joomla 3.8.1 and JFBConnect 7.2.2. This error happened in previous versions of Joomla and JFBConnect as well.

Google has been reporting some weird urls to me lately like:

www.example.com/component/content/article?id=103:article-alias

I have menu items setup for these pages which work. Anyways that is beside the point because this above url on my site returns a 500 error (see below for call stack). Looking at the code it looks like it is the function isValidArticle for one of your plugins is failing.

For some reason it is determining that the id of the article is 'article' which is causing the error. For now I have added the following code in the function to get around the error:
if ($id == 'article') { return false;}

Can you please look into this error and post a proper fix.

Thanks

Tom


Unknown column 'article' in 'where clause'

Call stack
# Function Location
1 () JROOT\libraries\joomla\database\driver\mysqli.php:650
2 JDatabaseDriverMysqli->execute() JROOT\libraries\joomla\database\driver.php:1652
3 JDatabaseDriver->loadObject() JROOT\plugins\opengraph\content\content.php:226
4 plgOpenGraphContent->isValidArticle() JROOT\plugins\opengraph\content\content.php:47
5 plgOpenGraphContent->findObjectType() JROOT\libraries\sourcecoast\openGraphPlugin.php:82
6 OpenGraphPlugin->onOpenGraphAfterDispatch() JROOT\libraries\joomla\event\event.php:70
7 JEvent->update() JROOT\libraries\joomla\event\dispatcher.php:160
8 JEventDispatcher->trigger() JROOT\libraries\src\Application\BaseApplication.php:108
9 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT\plugins\system\jfbcsystem\jfbcsystem.php:153
10 plgSystemJFBCSystem->onAfterDispatch() JROOT\libraries\joomla\event\event.php:70
11 JEvent->update() JROOT\libraries\joomla\event\dispatcher.php:160
12 JEventDispatcher->trigger() JROOT\libraries\src\Application\BaseApplication.php:108
13 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT\libraries\src\Application\SiteApplication.php:199
14 Joomla\CMS\Application\SiteApplication->dispatch() JROOT\libraries\src\Application\SiteApplication.php:233
15 Joomla\CMS\Application\SiteApplication->doExecute() JROOT\libraries\src\Application\CMSApplication.php:267
16 Joomla\CMS\Application\CMSApplication->execute() JROOT\index.php:49
Last edit: 6 years 6 months ago by eSilverStrike.
The topic has been locked.
Active Subscriptions:

None
Is anyone looking into this issue?
The topic has been locked.
Support Specialist
6 years 6 months ago #62856 by mel
I have read the thread and was planning on trying to recreate the issue on my test site. If you could answer these questions, it'd help:

* Are you using an extension for SEF routing like SH404 or are you just using standard SEF settings in Joomla 3.8 to add the alias to the URL?
* Are you using any extensions such as JReviews that use the Joomla article system? We've had some conflicts in the last few Joomla versions related to this.
* Are there any other Open Graph plugins enabled on your site?

In thinking through this more, that URL is definitely invalid. JFBConnect may be able to handle it better if a completely wrong article URL is generated, however, we'd highly recommend investigating where that URL is being generated in the first place. Usually Google will show the 'referrer' page which is where the link is being used. I'd investigate that referring page to figure out where the wrong URL with id=103:article-alias is being created and diagnose how to fix that. That way, bad URLs aren't being created in the first place. I don't think the bad URLs are being created by JFBConnect in the first place, our extension may just be having a hard time processing them.

-Melissa
The topic has been locked.
Active Subscriptions:

None
Thanks Mel.

I am using the latest version of JReviews with the JReviews SEF plugin along with the regular Joomla SEF plugin.

The JFB Connect Open Graph plugin is the only one enabled (The JReviews one is disabled).

No I agree that JFBConnect is not generating the url. I am not sure where it is coming from. Google search console reports that it is being linked from itself (It just lists the same url). I have even seen this type of url being listed in the search results.

This is one thing the REALLY frustrates me about Joomla. They have too many ways of generating a url for a page AND canonical tags do not work. The canonical tags for articles always just repeat what the url is and not what the preferred url should be for accessing the page (for example the menu item). This has been a problem for years and I do not understand why it has not been fixed or why other Joomla web admins are not up in arms about this. Duplicate content is a major issue to Google and canonical tags are way to solve this. (end of rant :-)
The topic has been locked.
Active Subscriptions:

None
Any word on this issue? Where you able to reproduce it?
The topic has been locked.
Support Specialist
We're having difficulties installing the latest version of jReviews. We have an earlier version that was meant for Joomla 3.7 but can't seem to get our license to work with Joomla 3.8.

If we test with the Open Graph - Content plugin enabled on a site without jReviews installed, we get a standard 404 error. That seems to indicate that there's some conflict between jReviews itself and our plugin.. and possibly jReviews is the cause. We'll try to investigate, but jReviews is encrypted, as you probably know, which means we may not be able to fully diagnose this on our own.

With that said, if you can Private Message us FTP credentials for your site along with admin credentials for the backend, we'll gladly try to take a look to investigate further on your site. You can PM me by clicking the mail icon under my name to the left.

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

None
Thanks, PM sent.

Surprised you got a 404 error. When I tried on the latest build of Joomla (using just the sample data I didn't get a 404 error.

I also am currently having this issue: www.sourcecoast.com/forums/jfbconnect/jf...fter-joomla-381-upda

Not sure if you want to double check anything regarding that while you are on my site but I will respond about the other issue in its forum topic.
The topic has been locked.
Support Specialist

Surprised you got a 404 error. When I tried on the latest build of Joomla (using just the sample data I didn't get a 404 error.

What do you get? I'm assuming if you don't get a 404 error, then you're getting the 500 error since the page doesn't actually exist?

Just trying to understand the differences between what you see and what we get when we test on a bare Joomla site.

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

None
I sent you a private message with my site and login details so you can see, didn't you get it?

I was getting a SQL error and when I added the code to fix the sql error it then goes to the listing. (not my preferred URL as I have no idea how google found it). Maybe it is the JReviews SEF plugin rerouting it? When I tried the weird url the demo site on JReviews it does take me to the listing as well (no error).

I tested on my bare bone Joomla site (the latest in the Joomla repository so it is newer than Joomla 3.8.1) the url didn't produce a 404 error. It went to the article page
.
The topic has been locked.
Active Subscriptions:

None
Hi Alex,

Have you been able to look at the issue yet on my site from the PM I sent you?

Thanks

Tom
The topic has been locked.