Databasejoin element problems

s6930064

Member
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
 
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
 
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
 
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
 
1. I can not change pop-up window titles for ?ADD? and ?SELECT?
These should now be translatable - see the plug-ins language file which should have at the bottom:

Code:
;Front end
PLG_ELEMENT_DBJOIN_ADD="Add"
PLG_ELEMENT_DBJOIN_SELECT="Select"

2. i hit SELECT icon but I can not select a record, I can only edit, view, delete them
I can't replicate this - it works for me
3. the SELECT pop up window does not use Front-end template from lists layout
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.
4. click add icon, in pop-up windows when I click ?save? i get ?error in returned json? :
Again I can't replicate this - it works as advertised on my test site
 
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
 
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
 
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?
 

Attachments

  • 01.png
    01.png
    2.1 KB · Views: 272
  • 02.png
    02.png
    8.7 KB · Views: 275
  • 03.png
    03.png
    2.5 KB · Views: 274
you should simply click anywhere in the row EXCEPT the view link to load the selected row, does this not happen for you?
 
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.
 
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
 
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
 
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>
 

Attachments

  • 01.JPG
    01.JPG
    18.3 KB · Views: 260
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
 
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
 
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
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top