Save, other buttons stop working for an element

mccarty

New Member
(3.1b on recent github pull, J3.0.3)

I was updating an element to add a Javascript action and then found that the Save, Save & Close, Save & New, and Save as Copy buttons no longer worked. Close and Help still worked. If I Close and then try again, the save buttons still don't work. Seems to be tied to this specific element - other elements can be saved just fine.

Turns out that if one puts "" as the value (as in do that when this != ""), you get something like the below in jsactions:

{"js_e_event":"show","js_e_trigger":"fabrik_trigger_element_animalRecords___secondChipProviderCode","js_e_condition":"!=","js_e_value":"""","js_published":"1"}

(I was trying to figure out how to use an action to show an element when the current element value was no longer empty)

Entering a "" in the value seems to be what causes the save buttons to no longer work.

It also turns out if you do the above that the action will get stored in the jsactions table when you create it, but after that, the action will not show up on the element edit screen - you have to go to the jsactions table directly to see that the action is there.

I deleted the bogus action from the jsactions table and all was well again...

Regards,

Rick
 
good spot. it seems the best solution is to swap out the " for &quote; using htmlspecialchars() when saving, and then revert the &quote; back to " when using inside fabrik.
I've committed a change which should do just that.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top