databasejoin element fronted

coullet

Member
Hi,

None of the frontend add/select button no longer working
Click on button make nothing...

Seems to be after update from github thuesday.

Thanks
 
Im not seeing that with this afternoon's github code.
Could you try re-updating from github please?
If that doesn't work could you point us at the url in question please?
 
I've updated only the database join directory, it's ok?
But the problem is not the same as described on github:
for me the popup don't open when i click.
the change with the last update is that i can open one time, but when i click on the close button on top, the popup don't close.
And i need to clean to reopen on emore time

On the site, after connect, get to "projections" menu and edit a record. You have several datebasejoin element in the tabs.
 
ok, sorry.
It work now, the popup pop up!

But in this window i have:
-yes/no element witch showing only "yes" and "no" , but not clikable
-a googlemap element witch don't showing the map

Many thanks
 
yes
I already had this problem some week before, but it was gone ...
so, it's probably a problem with popup and not with join element.
 
Have you got a url we can look at?
Do you get any javascript errors on the page?
 
go to "projections"
edit a record
click on + on the "salle" element
in the popup:
-fields "valid?e" and "afcae" have no button
-can't see the map, only "geocode" and long/lat

Thanks!
 
Hum...strange, you have not been auto-disconnect after the delay...
If think it's ok now, if not, try to disconnect (on top right) and reconnect.
Thanks
 
OK, I can see it again now. Really not sure what's going on with the YesNo, as you have another YesNo which works just fine. I'll see if I can replicate this here, as I'm doing some other work on YesNo today (getting it working in BS3 templates).

I'm also looking at the map issue. I think I know what's happening, it's just a case of how to fix it.

-- hugh
 
Did this ever work?

I really don't see a fix for it, because the form you are popping up from the join element, is on the same list as the main form is. Which means all the Fabrik element names, and hence DOM element names/ids, are the same, like eqds_salles___localisation for the map.

So when we do this in the map element's JS to create the map when you pop that window up ...

Code:
            this.map = new google.maps.Map(document.id(this.element).getElement('.map'), mapOpts);

The selector document.id(this.element).getElement('.map') is finding the first occurrence of this.element (which is "eqds_salles___localisation") ...

Code:
<div class="fabrikSubElementContainer" id="eqds_salles___localisation">...</div>

... which is the first one in the DOM, which is the one in the tab on the main form, not the one in the modal popup window.

I think if this ever worked, it was a lucky accident, and I really don't think we can support the modal Add for a join element which joins to "itself". Even though you are joining to a copy of the list/form, all of the naming is still based on the standard tablename___elementname convention we use, and the effects of having two sets of the same ID's in one DOM are "undefined".

-- hugh
 
No, it work sometimes, and sometimes not, so as you says, result are undefined..
I make that because of another bug with popup.
This form ("salles") have tabs, and when i change the tab, it's the the tab on the origin form bellow ("planning diffusion") changing.
Can not access to the different tab, so i used this workaround.
And each time i change tab, popup become larger.
You can test it: in "planning diffusion/id_salle" element change popup form to "salles"
Go to "projections", edit a record and try to add a record to "salle"
 
I'm not at my computer right now. Are 'salles' and 'planning diffusion' based on the same table?

Sent from my HTC One using Tapatalk
 
But as far as I can tell, your main table has list joins to the tables that your popups are on or have list joins to. Like 'eqds_salles'. So your main form has element names which duplicate the ones in the popups form. Which will always cause problems, as explained in my previous post. But I may be wrong, I'm kinda confused.

Anyway, for the tab selection issue, try this:

https://github.com/Fabrik/fabrik/commit/f4afeffd493b4e846a0aac898ab9c2dbd2177f69

-- hugh
 
Thanks for update, i will try.

Sorry, i try to understand, is that it:
My main list (planning_diffusion) have both databasejoin element and a list join on same table (eqds_salles), that's a source of problems?
May i use a copy of the list eqds_salles for the join to resolve that?
 
My main list (planning_diffusion) have both databasejoin element and a list join on same table (eqds_salles), that's a source of problems?
May i use a copy of the list eqds_salles for the join to resolve that?

No. The problem is that the form on the main page, and the form in your popup, both have groups which are list joins to the eqds_salles table. And because we name all elements as tablename___elementname, this means that in both forms, the elements in those groups have the same names and IDs, like eqds_salles___localisation for the map.

http://screencast.com/t/rdsZ91YgXRG

So as explained in post #14 above, this means that the map can't be created in the popup instance, because the container name being passed to the "new google.maps.Map()" call is not unique. So it recreates the map in the container of that name on the main form, not the popup form.

There just isn't a workaround for this. We'd have to change how we name elements on forms, which would mean rewriting ... well, pretty much everything!

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top