dropdown element type loses options between saves

skyrun

Active Member
if i create the list of values/labels and save and close, works fine.

but when you go back into the element (or just press save vs save+close), then the options go away and are gone forever.

using chrome and updated github from today.
 
done.

note it doesn't happen 100% of the time for me either... but once it starts happening for one element, it seems to happen all the time for that element until you log out, close the browser and reopen, then it's fine for awhile until it starts happening again (just on that one element, not on all).

when you press 'save' after the sub-options do not appear, then the sub-options are not stored in the db for the element in the json either, so they're gone from then on.

to reproduce (sometimes):
  1. logon to administrator panel as the userid sent
  2. go to fabrik elements and filter by group 'leads'
  3. click on 'status' element. if the sub options are there, then it's not failing (yet).
  4. press save+close, then click on status again... repeat until failure. (try just 'save' if 'save and close' doesn't do it. happens usually the first time for me, but sometimes takes 5-10 times for it to happen).
also... i get this js error (reported on chrome) when it doesn't display... which is probably a good clue... looks like a possible timing issue for js loading?:
Code:
Uncaught TypeError: Cannot call method 'addEvent' of null suboptions-min.js:1
Class.watchButtons suboptions-min.js:1
e.extend.$owner mootools-core.js:38
Class.initialize suboptions-min.js:1
(anonymous function) mootools-more.js:27
e.extend.$owner mootools-core.js:38
(anonymous function) mootools-core.js:37
(anonymous function) index.php:44
context.execCb require.js:1585
Module.check require.js:841
(anonymous function) require.js:1074
(anonymous function) require.js:126
(anonymous function) require.js:1117
each require.js:58
Module.emit require.js:1116
Module.check require.js:895
Module.enable require.js:1104
Module.init require.js:754
callGetModule require.js:1129
context.completeLoad require.js:1499
context.onScriptLoad require.js:1606

finally, another thing to note... in jos_fabrik_elements, i have TWO entries for a 'status' element. one is published=-2 and doesn't show anywhere i know of. looks like it's been deleted? perhaps this only occurs when there are other elements in the same group with the same name and it sometimes picks the wrong one (?) just a guess.
 
grrr, well ive been hammering away at your page (for about 15 mins on and off), and can not get the error to occur ;(

I've added an additional check into suboptions.js so that if that error is going to occur at least it gives you a warning that it has occurred along with an option to reload the page from the server.

Btw the ftp details you gave me, whilst they allow me to connect, doesn't have sufficient permissions to allow me to upload files, could you see if you can alter that to allow me to upload files?
 
Re the "two status elements" thing ... have you emptied your trash?

Remember that in J! 3.1, when you delete "things", they don't get hard deleted, and hang around in a "trashed" state until you empty the trash. So select "Trashed" from the "Status" filter on your element, then use the Trash button to actually hard delete everything.

If you haven't emptied the trash for a long time, I'd recommend doing a database backup first. I've occasionally seen issues arise if you've never emptied the trash, and deleted a lot of elements, which are still sitting around in our tables. I think those issues got solved a while back, but best to be on the safe side.

-- hugh
 
Oh, and as usual, be careful about whether you ask us to delete the underlying database field when you trash the element(s). Only you know if it's data you still need, so don't just hit "yes", think about it first.

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

Thank you.

Members online

Back
Top