?
avatar nicksavov
nicksavov
8 Apr 2015

I'm not 100% sure this is a bug, but here goes:

Steps to reproduce the issue

1) Uninstall weblinks
2) Install OSMap (https://github.com/OSTraining/OSMap/releases/download/v3.0.2/com_osmap_free_3.0.2.zip)
3) In the administrator control panel (administrator/index.php), you should see an internal server error for the "Site Information" module:

Error 1146: Table '_weblinks' doesn't exist SQL=SELECT COUNT(id) AS count_links FROM _weblinks WHERE state = 1

Expected result

The "Site Information" module should work. I'm guessing the error should be caught and it should degrade gracefully.

Actual result

Error 1146: Table '_weblinks' doesn't exist SQL=SELECT COUNT(id) AS count_links FROM _weblinks WHERE state = 1

Additional comments

It's because of this code:
https://github.com/joomla/joomla-cms/blob/3.4.1/libraries/cms/component/helper.php#L102

It's querying for the "element", however the weblinks plugin in OSMap uses an element of "com_weblinks" because it's a weblinks plugin.

avatar nicksavov nicksavov - open - 8 Apr 2015
avatar nicksavov nicksavov - change - 8 Apr 2015
Labels Removed: ?
avatar mbabker mbabker - reference | - 8 Apr 15
avatar brianteeman
brianteeman - comment - 8 Apr 2015

The issue does happen with your code BUT When you look at all other plugins you will see that the element is in the form "contacts" and not "com_contacts"


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6697.
avatar zero-24 zero-24 - change - 8 Apr 2015
Labels Added: ?
avatar Bakual
Bakual - comment - 8 Apr 2015

I don't think we have a naming convention for the "element". The query actually is missing to check for the "type" as well since it's supposed to only return component entries.

#6701 should fix this.

avatar Bakual Bakual - change - 8 Apr 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-04-08 08:37:27
avatar Bakual Bakual - close - 8 Apr 2015
avatar Bakual Bakual - close - 8 Apr 2015
avatar brianteeman
brianteeman - comment - 8 Apr 2015

Only going by the fact that no other core plugin uses com_ in the element

On 8 April 2015 at 09:37, Thomas Hunziker notifications@github.com wrote:

I don't think we have a naming convention for the "element". The query
actually is missing to check for the "type" as well since it's supposed to
only return component entries.

#6701 #6701 should fix this.


Reply to this email directly or view it on GitHub
#6697 (comment).

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar Bakual
Bakual - comment - 8 Apr 2015

Yep, core does use other element names. OSMap uses the names XMap originally used.
Neverthless the query is wrong anyway. We want to retrieve components only and thus need to filter by them :)

avatar Bakual
Bakual - comment - 8 Apr 2015

Ignore my PR. Michael was earlier and does the same :smile:

Add a Comment

Login with GitHub to post a comment