Menu item most recent w/publish date

Status
Not open for further replies.

prophoto

Active Member
In my EQM site my client uses the start/finish publish filters all the time for their regular content. I setup a new list for a gallery of images that also need to be published each month. There is an element called publish_date in the list.

I have a details layout menu item setup called 'View Current Issue' in the 'User Menu' /current-issue.html. I would like only the most recent item to show but only AFTER the publish date. I tried adding a prefilter to the list with LESS THAN NOW() NO QUOTES. This works fine for the list view but not the details link. Below is the error I am getting on the details link page.

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 'eqm3_fabrik_currentissue``.``id``) FROM `eqm3_fabrik_currentissue`WHERE ( eqm3' at line 1 SQL=SELECT MAX(``eqm3_fabrik_currentissue``.``id``) FROM `eqm3_fabrik_currentissue`WHERE ( eqm3_fabrik_currentissue.publish_date < (NOW()) )
 
If I change the Apply To on the prefilter to Guest the error goes away, but shows the most recent item not the most recent, published item.
 
Look at ./components/com_fabrik/models/form.php, line 3048. Change ...

Code:
$k = $fabrikDb->quoteName($item->db_primary_key);

... to ...

Code:
$k = FabrikString::safeNameQuote($item->db_primary_key);
... let me know if that fixes it.
-- hugh
 
Per our conversation lists are not being filtered correctly when guest is chosen as the group in the list prefilter.
 
Like I said, I'm completely at a loss, can't replicate it, no clue what's happening, no earthly idea of where or how to debug it.

Can you try going back to basics, set up a test list with a filter for Guests, and make sure it behaves normally.

-- hugh
 
I setup a test list in my EQM site, its #4. /index.php?option=com_fabrik&task=list.view&listid=5. There is a prefilter on the list for element #71 to equal 0, applying to only guests. When you view this list in the frontend it shows all rows, not just the two rows that equal 0. When you change the group back to public it only shows 2 rows.

I am comparing the group/admin levels to a new installation now, if I find anything weird I 'll post it.
 
You have set your "Guest user group" to "Public" instead of "Guest" (in Joomla's Users/Options), so any prefilter applied to "guest" will never be run.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top