1. Hugh (cheesegrits) here. Thank you for all the good wishes. My back surgery was a success, post-op recovery is going well, and I'm getting stronger and feeling better every day. I hope to be getting back in the saddle and working support again over the next few days.
  2. IMPORTANT NOTE - we have made some changes in our github branch naming. The 'master' branch no longer exists, and is now called 'joomla25' (which is Fabrik 3.0). The 'joomla3' branch (which is Fabrik 3.2) remains unchanged. We have also removed all the other testing branches which had accuulated over the last few years. I have posted a thread in the Community forum for 3.0 with some more information, feel free to as questions there.

Databasejoin element problems

Discussion in 'Fabrik 3.x Testing' started by s6930064, Apr 28, 2012.

  1. s6930064 Member

    Level: Community
    Fabrik-fabrik-3.0.5-172-gb3dfb74.zip
    Plug-in = databasejoin
    Render join as = auto-complete
    Popup form = testform
    Add option in front end = YES
    Front-end Select = YES

    Problems
    1. I can not change pop-up window titles for ‘ADD’ and ‘SELECT’
    2. i hit SELECT icon but I can not select a record, I can only edit, view, delete them
    3. the SELECT pop up window does not use Front-end template from lists layout
    4. click add icon, in pop-up windows when I click ‘save’ i get ‘error in returned json’ :
    POST http://127.0.0.1/test/component/fabrik/form.process/0/0/raw?tmpl=component&ajax=1&Itemid=&format=raw 404 (Not Found)
    c.Request.Class.sendmootools-core.js:485
    i.extend.$ownermootools-core.js:141
    sendmootools-more.js:250
    Class.doSubmitform-min.js:1
    i.extend.$ownermootools-core.js:141
    (anonymous function)mootools-core.js:89
    emootools-core.js:368
    mootools-ext-min.js:1
    error in returned json

    XMLHttpRequest
    1. onabort: null
    2. onerror: null
    3. onload: null
    4. onloadend: null
    5. onloadstart: function (){}
    6. onprogress: function (){}
    7. onreadystatechange: function (){}
    8. readyState: 4
    9. response: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">↵<html><head>↵<title>404 Not Found</title>↵</head><body>↵<h1>Not Found</h1>↵<p>The requested URL /test/component/fabrik/form.process/0/0/raw was not found on this server.</p>↵<p>Additionally, a 406 Not Acceptable↵error was encountered while trying to use an ErrorDocument to handle the request.</p>↵<hr>↵<address>Apache/2.2.21 (Win32) PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Server at 127.0.0.1 Port 80</address>↵</body></html>↵"
    10. responseText: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">↵<html><head>↵<title>404 Not Found</title>↵</head><body>↵<h1>Not Found</h1>↵<p>The requested URL /test/component/fabrik/form.process/0/0/raw was not found on this server.</p>↵<p>Additionally, a 406 Not Acceptable↵error was encountered while trying to use an ErrorDocument to handle the request.</p>↵<hr>↵<address>Apache/2.2.21 (Win32) PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1 Server at 127.0.0.1 Port 80</address>↵</body></html>↵"
    11. responseType: ""
    12. responseXML: null
    13. status: 404
    14. statusText: "Not Found"
    15. upload: XMLHttpRequestUpload
    16. withCredentials: false
    17. __proto__: XMLHttpRequest
    1. DONE: 4
    2. HEADERS_RECEIVED: 2
    3. LOADING: 3
    4. OPENED: 1
    5. UNSENT: 0
    6. abort: function abort() { [native code] }
    7. addEventListener: function addEventListener() { [native code] }
    8. constructor: function XMLHttpRequest() { [native code] }
    9. dispatchEvent: function dispatchEvent() { [native code] }
    10. getAllResponseHeaders: function getAllResponseHeaders() { [native code] }
    11. getResponseHeader: function getResponseHeader() { [native code] }
    12. open: function open() { [native code] }
    13. overrideMimeType: function overrideMimeType() { [native code] }
    14. removeEventListener: function removeEventListener() { [native code] }
    15. send: function send() { [native code] }
    16. setRequestHeader: function setRequestHeader() { [native code] }
    17. __proto__: Object
  2. s6930064 Member

    Level: Community
    Hi, any comment ?. Biggest problem is number 4 (save - error in returned json)
    Thanks in advance
  3. cheesegrits Support Gopher

    Level: Community
    Looking at these issues now. Sorry about the delay, I took the weekend off.

    -- hugh
  4. s6930064 Member

    Level: Community
    problem continues with new Fabrik-fabrik-3.0.5-195-g3c93333.zip
  5. cheesegrits Support Gopher

    Level: Community
    I'm still trying to replicate a couple of the issues. You may need to bump this a few times to keep it on my radar.

    -- hugh
  6. s6930064 Member

    Level: Community
    I did some digging and here is what I found :

    for 2 and 3 see wiki http://fabrikar.com/wiki/index.php/Database_join -> Front end select - a work in progress - please ignore for the time being……. So I can only ask if there is a timetable for complete implementation.

    for 4, it was a problem with one rewrite rule I have in my .htaccess -> RewriteCond %{QUERY_STRING} (^|&)tmpl=(component|system) [NC]
    … so if I have a url with …&tmpl=component… I get 404
  7. s6930064 Member

    Level: Community
    to change titles 'Add' you must change line 70 in file databasejoin.js
    to change titles 'Select' you must change line 284 in file databasejoin.js
  8. rob Administrator

    Level: Community
    These should now be translatable - see the plug-ins language file which should have at the bottom:

    Code (text):

    ;Front end
    PLG_ELEMENT_DBJOIN_ADD="Add"
    PLG_ELEMENT_DBJOIN_SELECT="Select"
     
    I can't replicate this - it works for me
    this is because the popup template has specfic code to enable the row selection, so can not be the same as the main list template.
    Again I can't replicate this - it works as advertised on my test site
  9. s6930064 Member

    Level: Community
    Last update Fabrik-fabrik-3.0.5-234-gfb7f6cd.zip.

    1 = ok
    2 = i can not make ‘select’ to work. I go to a form (component/fabrik/form/9). when I click ‘select’ icon I get a pop-up windows with 10 records (option=com_fabrik&view=list&tmpl=component&layout=dbjoinselect&ajax=1&listid=14&triggerElement=tbl___f1&resetfilters=1)
    Now if i select a record with a click, fabrik sends me to detail form of that record (component/fabrik/details/13/2) for save. If I click save I go back (component/fabrik/form/9) and field is empty.

    I don’t think this is correct, I must be missing something…



    3 = ok
    4 = ok, see post #6, it was a problem with one rewrite rule I have in my .htaccess
  10. cheesegrits Support Gopher

    Level: Community
    Like Rob, I can't duplicate 2. And looking at our code, I can't see anything which would cause that to happen.

    The only way I could work out what's going on with your site would be to have access to the page.

    One question ... do you have any elements on the list in your popup which have "link to details" enabled? And if so, is that the element you are clicking in to select the row?

    -- hugh
  11. s6930064 Member

    Level: Community
    Fabrik-fabrik-3.0.5-234-gfb7f6cd.zip – labels above form template

    Yes, element I click in popup windows has link to details enabled, but if I disabled it then I can only view element in a form

    Sorry, the best I can do is attached some images.



    Is there something I don't see?

    Attached Files:

    • 01.png
      01.png
      File size:
      2.1 KB
      Views:
      43
    • 02.png
      02.png
      File size:
      8.7 KB
      Views:
      44
    • 03.png
      03.png
      File size:
      2.5 KB
      Views:
      41
  12. rob Administrator

    Level: Community
    you should simply click anywhere in the row EXCEPT the view link to load the selected row, does this not happen for you?
  13. s6930064 Member

    Level: Community
    no i can't.
    for example i go just left from HR record i click and nothing is happening. Mouse pointer is not hand, just arrow.

    Only 'view' and link to details are working with mouse pointer hand.

    firebug does not give any errors.
  14. cheesegrits Support Gopher

    Level: Community
    Hmmm, this may be an artifact of having just the one element displayed.

    As an experiment, can you try enabling some other element to show in the list, and see if clicking on that will select the row?

    -- hugh
  15. s6930064 Member

    Level: Community
    Fabrik-fabrik-3.0.5-239-g1811071.zip
    Chrome private mode (no cache)

    I have enable ‘show in list’ for two more elements (id and create date) but still I can not click a row. Only 'view' and link to detail form.

    My element setup is:
    - plug-in = databasejoin
    - Render join as = autocomplete
    - table = tbl_jobtitles
    - value = id
    - label = jobname
    - apply where to = public
    - add option to front end = yes
    - link to join record = no
    - front end select = yes
    Validation = notempty
  16. cheesegrits Support Gopher

    Level: Community
    I still can't duplicate this.

    Can we get at your page?

    -- hugh
  17. s6930064 Member

    Level: Community
    sorry, site is on intranet with no access from internet.

    So back to basics with a fresh install:
    - Joomla 2.5.4 + pkg_fabrik_3.0.5.2.zip + Fabrik-fabrik-3.0.5-253-gf27ba17.zip
    - install fabrik sample data (tools->install sample data)
    - create a new list to use for databasejoin-autocomplete and insert some data
    - add element databasejoin to sample ‘contact_sample’ table with front end select enabled (image 01.jpg)

    Now in frontend (with Chrome - no cache ) the status of the autocomplete element is
    <div class="fabrikElement">
    <input type="text" size="20" name="a5wsg_fb_contact_sample___xjob-auto-complete" id="a5wsg_fb_contact_sample___xjob-auto-complete" value="" class="fabrikinput inputbox autocomplete-trigger" autocomplete="off">
    <input type="hidden" class="fabrikinput" size="20" name="a5wsg_fb_contact_sample___xjob[]" id="a5wsg_fb_contact_sample___xjob" value="">
    <a href="#" class="toggle-selectoption" title="Select"><img src="http://localhost/test/media/com_fabrik/images/search.png" alt="Select"></a>
    <a href="#" title="Add" class="toggle-addoption">
    <img src="http://localhost/test/media/com_fabrik/images/action_add.png" alt="Select"></a>
    </div>

    when I click ‘select’ in frontend ‘Contact us Data’ I get popup select window and YES I can click a row, popup close BUT field does not show selected data. i think this is because script \components\com_fabrik\views\list\tmpl\dbjoinselect\javascript.js runs ok until line 43, where it stops.

    full status of autocomplete element after popup closed :

    <div class="fabrikElement">
    <input type="text" size="20" name="a5wsg_fb_contact_sample___xjob-auto-complete" id="a5wsg_fb_contact_sample___xjob-auto-complete" value="" class="fabrikinput inputbox autocomplete-trigger" autocomplete="off">
    <input type="hidden" class="fabrikinput" size="20" name="a5wsg_fb_contact_sample___xjob[]" id="a5wsg_fb_contact_sample___xjob" value="2">
    <a href="#" class="toggle-selectoption" title="Select"><img src="http://localhost/test/media/com_fabrik/images/search.png" alt="Select"></a>
    <a href="#" title="Add" class="toggle-addoption">
    <img src="http://localhost/test/media/com_fabrik/images/action_add.png" alt="Select"></a>
    </div>

    Attached Files:

    • 01.JPG
      01.JPG
      File size:
      18.3 KB
      Views:
      42
  18. rob Administrator

    Level: Community
    can you set up a test site with a demo of the issue? Basically if neither me nor hugh can replicate or see the issue then we're stuck
  19. s6930064 Member

    Level: Community
    I think I found this one to :

    If I use Render join as = dropdown
    then Select works

    If I use Render join as = autocomplete
    then select does not work

    as you can see from my posts (15,17) I use autocomplete and that’s why I have problem.



    Do you think that frontend select could work for autocomplete as well ?


    ps : I will try to create a test site with internet access for future use
  20. s6930064 Member

    Level: Community
    Here is my test site

    http://myadek.no-ip.org/test


    Fresh install:
    - Joomla 2.5.4 + pkg_fabrik_3.0.5.2.zip + Fabrik-fabrik-3.0.5-277-gf43f89e.zip
    - install fabrik sample data (tools->install sample data)
    - create a new list to use for databasejoin-autocomplete and insert some data
    - add element databasejoin to sample ‘contact_sample’ table with front end select enabled

    You can access the form from top menu FABRIK-FORM -> job field


    The problem is when field is databasejoin-> autocomplete frontend select is not working

Share This Page