• Fabrik4.5.3 for J!5.3.0 and J!4.2+is out

    You must update from Fabrik4.5.1 if you are running Joomla!5.3.0

    See Announcements

FixMe Auto-complete doesn't work in menu subitem

Trembowiecki

Active Member
Hi,

first things first: PHP 8.3, Joomla 5.2.4, Fabrik 4.5.1.

I have a menu which has an item (fabrik List), which has a subitem (other fabrik list). When I use auto-complete filter for a field element in a subitem, it throws a lot of errors in console.

Code:
Fabrik autocomplete: Ajax failure: Code 404:

Uncaught TypeError: Cannot read properties of undefined (reading 'get')
    at Object.<anonymous> (autocomplete-bootstrap.js:159:81)
    at Object.<anonymous> (mootools-core.js:858:45)
    at Array.forEach (<anonymous>)
    at Array.forEach (mootools-core.js:121:34)
    at Array.each (mootools-core.js:193:19)
    at Object.fireEvent (mootools-core.js:857:15)
    at Object.<anonymous> (mootools-core.js:787:27)
    at Object.onFailure (mootools-core.js:3526:44)
    at Object.<anonymous> (mootools-core.js:787:27)
    at Object.failure (mootools-core.js:3523:22)

Here's my observations:
1) it happens only when I have URL rewriting enabled. When I disable it, auto-complete works,
2) when I move the subitem to main item level, auto-complete works (even with URL rewriting enabled) and stops working the moment I move it back to its old place.

So it looks like auto-complete has an allergy for menu subitems + URL rewriting.
 
I feel embarassed. It's like amnesia or something. Anyway, it was MINE thread:

https://fabrikar.com/forums/index.php?threads/problem-with-auto-complete-filter.54585/

And the solution is still identical like in that thread:

Code:
components / com_fabrik / router.php
Line 214
change
if (!$menuItem instanceof Joomla\CMS\Menu\MenuItem || !isset($query['view']))

to
if (!$menuItem instanceof stdClass || !isset($query['view']))

I've had a few months break, so have to relearn a lot of things, sorry. Anyway - this sucks a little to have to hack Fabrik after each update, but since it's the only way...
 

Members online

No members online now.
Back
Top