JoomFish / joomfish-2.5

Joom!Fish 2.5 core development
http://www.joomfish.net/
34 stars 27 forks source link

Column 'title' in field list is ambiguous #126

Closed kversch closed 11 years ago

kversch commented 11 years ago

When I enable the joomfish language selector the following error appears: (The site still seems to be working though.)

Error loading module Column 'title' in field list is ambiguous SQL=SELECT id, title, module, position, content, showtitle, params, mm.menuid,jfself.id AS id FROM ei85o_modules AS m INNER JOIN ei85o_modules AS jfself USING (id) LEFT JOIN ei85o_modules_menu AS mm ON mm.moduleid = m.id WHERE m.published = 1 AND (m.publish_up = '0000-00-00 00:00:00' OR m.publish_up <= '2013-01-19 13:43:43') AND (m.publish_down = '0000-00-00 00:00:00' OR m.publish_down >= '2013-01-19 13:43:43') AND m.access IN (1,1) AND m.client_id = 0 AND (mm.menuid = 102 OR mm.menuid <= 0) AND m.language IN ('en-GB','*','nl-NL') ORDER BY position, ordering

akempkens commented 11 years ago

Can you give us some more details about your site? What Joomla version and what version of JoomFish?

kversch commented 11 years ago

Joomla 2.5.8 and github release of Joomfish from today (v2.5.0). We are using the shape5 construction template and I already fixed one issue which was already posted here: https://github.com/JoomFish/jf-future/issues/101

The Column 'title' in field list is ambiguous error actually doesn't appear when using the beez2 default template now that I tested it. I guess this problem is related to shape5 as well?

klas commented 11 years ago

If it works with default template then shape5 would be surely to blame, probably they are doing their own queries to get the menu items instead of using builtin joomla function for this

klas commented 11 years ago

very easy to fix on the shape5 side: just replace SELECT title, module, position, content, showtitle, params FROM #_modules AS m with SELECT m.title, m.module, m.position etc. -all select columns need to be prefixed with what comes in AS part, the same as core joomla is doing in their query https://github.com/joomla/joomla-cms/blob/2.5.x/includes/menu.php#L31

or even simpler - use $app = JFactory::getApplication(); $menu = $app->getMenu();

kversch commented 11 years ago

Thanks! I appreciate your help.

kversch commented 11 years ago

I just did exactly the same setup on a different server and now I get this error: Any ideas? I already fixed this issue previously: https://github.com/JoomFish/jf-future/issues/101

Strict Standards: Only variables should be assigned by reference in /share/MD0_DATA/Web/secotron/templates/construction/vertex/cms_core_functions.php on line 4

Strict Standards: Only variables should be assigned by reference in /share/MD0_DATA/Web/secotron/templates/construction/vertex/cms_core_functions.php on line 8 Strict Standards: Only variables should be assigned by reference in /share/MD0_DATA/Web/secotron/templates/construction/vertex/cms_core_functions.php on line 23 xml:lang="en-GB" lang="en-GB" > Strict Standards: Only variables should be assigned by reference in /share/MD0_DATA/Web/secotron/templates/construction/vertex/call_menu.php on line 3

Strict Standards: Only variables should be assigned by reference in /share/MD0_DATA/Web/secotron/templates/construction/vertex/call_menu.php on line 8 Login | Register

Strict Standards: Non-static method S5modMainMenuHelper::S5buildXML() should not be called statically, assuming $this from incompatible context in /share/MD0_DATA/Web/secotron/templates/construction/vertex/s5flex_menu/default.php on line 43

Fatal error: Cannot redeclare class JMenuSite in /share/MD0_DATA/Web/secotron/includes/menu.php on line 18

klas commented 11 years ago

First try setting you error reporting in joomla to a lower value, this are irrelevant strict standards messages coming from vertex framework.

klas commented 11 years ago

except fromt he alst one, that one is probably caused by previous messages rendering, if not there is hardcoded include somewhere (instead of loading class via joomla loader)

kversch commented 11 years ago

My mistake, require_once $path; existed twice in the modified code...

klas commented 11 years ago

do not use require , use JLoader::import to load classes https://github.com/joomla/joomla-cms/blob/2.5.x/libraries/loader.php , this prevent loading of already loaded classes e.g. menu class that is overriden by joomfish

squadx commented 9 years ago

PLEASE HELP:

the site was working fine and suddenly when you add a menu I get this error:

Error loading module Column 'title' in field list is ambiguous SQL = SELECT id, title, module, position, content, showtitle, params, mm.menuid, jfself.id AS id FROM ...

I'm using Shape5, please help ...