The dreaded FLEXI_ITEM mysql_num_rows() problem

More
13 years 7 months ago #14705 by gege
Hello community. I now have the dreaded FLEXI_ITEM problem. The only thing I know is that I only get it on the directory page (the page with all your categories and subcategories) of Flexicontent.

(This started happening when I still have 1.5.2 installed, btw. So I stopping using it, but now I want to get back into using FlexiContent)

I created a menu item to link to the Directory of the categories I have:[attachment=2:3e9x2nq7]<!-- ia2 -->flexidirectory1.jpg<!-- ia2 -->[/attachment:3e9x2nq7]

I made things simple after the upgrade to 1.5.4 just to check:[attachment=1:3e9x2nq7]<!-- ia1 -->flexidirectory2.jpg<!-- ia1 -->[/attachment:3e9x2nq7]

The Categories are published. I have added a couple of items to make sure. I do have custom fields, but they're like textarea and something else.

The individual page for the item works fine. Its just the DIRECTORY page that throws these two errors:
[attachment=0:3e9x2nq7]<!-- ia0 -->flexidirectory3.jpg<!-- ia0 -->[/attachment:3e9x2nq7]

??

I turned on Joomla's debug system, I saw more specifics:

500 - JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND c.access <= 2' at line 1 SQL=SELECT c.id FROM jos_categories AS c WHERE c.published = 1 AND c.section = 10 AND c.parent_id = AND c.access <= 2
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14709 by micker
do you change item deph to 0 to do some test ?

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14753 by gege

micker wrote: do you change item deph to 0 to do some test ?

Hi. Yes I did. When i first tried it, I had the item depth set to "root". I changed it to 1, then to 2 hoping that maybe it would work.

I also went to
admin > Tools > Clean cache
and
admin > Tools > Purge expired cache

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14757 by gege
I fixed the 2nd error. For some reason, my line 61 in default_categories.php looked like this:
Code:
<div class="column"<?php echo $style; ?>>

...when I think it should look like this:
Code:
<div class="column<?php echo $style; ?>">
(I'm not a php coder, but some of the other code looked like that, so I changed it)

I changed it and didn't see the 2nd error anymore. But I can't check to make sure that was the right change because I still have the 1st error.

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14758 by gege
I don't really know a whole lot, but shouldn't there be a value for c.parent or is that the way it's supposed to come out?

500 - JDatabaseMySQL::query: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND c.access <= 2' at line 1 SQL=SELECT c.id FROM jos_categories AS c WHERE c.published = 1 AND c.section = 10 AND c.parent_id = AND c.access <= 2

[attachment=0:1dbfxn1f]<!-- ia0 -->flexidirectory5.jpg<!-- ia0 -->[/attachment:1dbfxn1f]

I haven't search all the files, but the only one I've found so far with these kinds of codes in it is
components > com_flexicontent > models > flexicontent.php

c.parent_id looks like this:
Code:
$query = 'SELECT c.*,' . ' CASE WHEN CHAR_LENGTH( c.alias ) THEN CONCAT_WS( \':\', c.id, c.alias ) ELSE c.id END AS slug,' . ' (' . ' SELECT COUNT( DISTINCT i.id )' . ' FROM #__content AS i' . ' LEFT JOIN #__flexicontent_cats_item_relations AS rel ON rel.itemid = i.id' . ' LEFT JOIN #__flexicontent_items_ext AS ie ON ie.item_id = i.id' . ' LEFT JOIN #__categories AS cc ON cc.id = rel.catid' . $subjoin . $where . $suband . ')' . ' AS assigneditems' . ' FROM #__categories AS c' . $join . ' WHERE c.published = 1' . ' AND c.section = '.FLEXI_SECTION . ' AND c.parent_id = ' . $rootcat . $and . ' ORDER BY '.$ordering ; return $query;



and this:
Code:
$query = 'SELECT c.id' . ' FROM #__categories AS c' . $join . ' WHERE c.published = 1' . ' AND c.section = '.FLEXI_SECTION . ' AND c.parent_id = ' . $rootcat . $and ; return $query;
Attachments:

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #14780 by kenmcd

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.875 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline