• Fabrik4.5.1 for Joomla5.2.4

    Fabrik4.5.1 is out. This update is needed for J!5.2.4

    See Announcements

Workaround Problem with auto-complete filter

Trembowiecki

Active Member
Hi,

I have a site with Fabrik list (call it A) in my main menu (1st level) and another Fabrik list B in submenu. List B has thousands of records, so I chose auto-complete as a list element (field) filter. It all worked great until I updated Fabrik from 4.0 to 4.1. (I have Joomla 5.1.1). Now when I try to use filter, it just doesn't show available values and console says: 'Fabrik autocomplete: Ajax failure: Code 404: Not Found'. The thing is: when I move list B to 1st level of the menu (so there's no parent above it), the auto-complete works again. When I move it to submenu, it goes south.

What I've noticed: Fabrik 4.0 showed urls like .../menuwithfabriklist/list/listnumber, Fabrik 4.1 shows just .../menuwithfabriklist. When menu item is NOT in submenu, auto-complete works. Put it in submenu and it doesn't. Funny thing is - when I manually add to the submenu url at the end: '/list/listnumber', auto-complete works. Also, auto-complete in submenu works if I temporarily disable 'Use URL Rewriting'.

Just in case - my settings: 'Search Engine Friendly URLs' and 'Use URL Rewriting' are both ON.
 
I've changed the file the way you suggested, but no luck - I still get that 404 error.

Looks like I have to disable 'Use URL Rewriting' for the time being, which is really dirty workaround :-(
 
Last edited:
Did you enable debug JS in Fabrik options? Otherwise it will run the compressed/unchanged file.

Ah, ok, the modification is in _doPageNav, so we have to look for additional places...
 
I had Joomla 5.0.x and Fabrik 4 - it was working. Then upgraded Joomla to 5.1.1 - still was working. Then upgraded Fabrik to 4.1 and it stopped working. I'm paranoid, so I have everyday backups of my sites kept for over a year, and can go back to any point and simulate any scenario. This way I tracked the exact moment when auto-complete waved white flag.
 
Then it may be this fix
1718276285259.png

breaking in the "child-menu" case?
 
Yes! This is exactly it. Switching line 210 make auto-complete work or not, so yeah, it's the culprit. Thank you VERY much!!!
 
Looks like you just can't have everything. As I don't care about those suffixes (like 'list/listnumber'), I'll just be hacking the Fabrick core like I do after each update anyway. I'm happy I know what to modify in the first place, so thank you once again for that.
 
Back
Top