[Solved] Auto-complete is not working in dbjoin plugin (Unexpected token < )

Makulia

Member
Hello, Community!

Case: I am making a task managment system with calendar viz. I need to populate field "responsible" through dbjoin and does it with auto-complete option (because drop-down list is too long for this case).
Problem: When "Render as" is set to "auto-complete" AC is not working and it is an error in the Chrome console: Unexpected token <. If "Render as" is set to any other option everything works as expected!
Specs: Joomla 3.3.3/Fabrik 3.2+latest github updates

Please, help!
 

Attachments

  • aс_bug.png
    aс_bug.png
    15.4 KB · Views: 214
Usually the "Unexpected token <" is coming from an error message, you can use the network tab/Response in your Chrome dev tools to examine which one.

What is you Joomla error reporting level?
 
My Joomla error reporting level is set to "none".
I have tried to enable Joomla debug and hear is what I have found.
 

Attachments

  • aс_bug1.png
    aс_bug1.png
    43.1 KB · Views: 218
Try to find the complete "wrong" json string:
in Chrome dev tools "Network" tab, last "index.php...." entry, "Response" tab
 
In the last index.php response i have found this errors:
Full request url:
Code:
http://serv/administrator/index.php?option=com_fabrik&format=raw&view=plugin&task=pluginAjax&g=element&element_id=94&formid=6&plugin=databasejoin&method=autocomplete_options&package=fabrik
Error1:
Code:
<title>??????: 0 plugin manager: did not load /home/appmanager/www/serv/public_html/plugins/fabrik_/databasejoin/models/databasejoin.php</title>
Error2:
Code:
<div class="container-fluid container-main">
        <section id="content">
            <!-- Begin Content -->
            <div class="row-fluid">
                    <div class="span12">
                        <!-- Begin Content -->
                        <h1 class="page-header">?????????? ??????.</h1>
                        <blockquote>
                            <span class="label label-inverse">0</span> plugin manager: did not load /home/appmanager/www/serv/public_html/plugins/fabrik_/databasejoin/models/databasejoin.php                        </blockquote>
                        <p><a href="/administrator" class="btn"><i class="icon-dashboard"></i> ????????? ? ?????? ??????????</a></p>
                        <!-- End Content -->
                    </div>
</div>
            <!-- End Content -->
 
I can't replicate.
A dbjoin element set to autocomplete is working fine in the form opened from a calendar viz.

What is you exact setup?
Calendar via menu item, content plugin...?
Is the autocomplete working if the form is called via list view or menu directly...?
 
I have made a several tests. You are right, auto-complete is working fine in the form opened from a calendar viz, but it is not working in the adding/editing form called from the List view in the Joomla backend!

My setup: calendar via menu item. List view via fabrik admin UI (/administrator/index.php?option=com_fabrik&view=lists).
 
Update 1: I have double-checked list issue and confirming that problem exist in the Joomla/Fabrik backend list view. In the fronted list view/calendar vis everything works fine!

Update 2: Seems that we have wrong path here: /fabrik_/databasejoin/models/databasejoin.php
 
It's not a typo, it's something in the way the AJAX call is getting routed, it's winding up being dispatched incorrectly, through a view, instead of directly through the controller. I'm woring on it.

-- hugh
 
Hugh, really appreciate your quick response! Patiently waiting for the bug fix.
BTW, yesterday I become the Fabrik translator in transifex.com and will do my best to translate this great component into Russian language.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top