• Fabrik V4.4.1 is now available.

    This version corrects the Admin issue introduced by V4.4. V4.4.1 is available through the Joomla Updater or for download through your My Downloads area of our website.

    Turns out a code change intended for our 5.0dev branch inadvertantly got pushed to the 4.x branch (by me, duh!). The javascript structure in 5.0 will change considerably and part of that change took effect with the inadvertant code change.

    We have reverted the code change and released 4.4.1. V4.4 has been retracted.

    Sorry for any inconvenience.

  • A new version of Full Calendar is now available.

    See the details here

JDate Element NULLs out in database when saved from an edit form if read only.

Status
Not open for further replies.

ghicar

Member
I have found a bug in Fabrik4(delta) for the JDate element used read only in a Fabrik form. The forms work fine in J!3 & Fabrik3.10. Apologies if this is reported already, but I could not see it searching manually in this forum.

If you have a list with a JDate element that is displayed read only in an edit form, then upon saving the row the JDate field is NULLED out in the database.
The JDate element is configured to display in "Y-m-d" format. And is made read only by setting Access:Form(edit) to "nobody".

This occurred in a more complex table structure with joined tables and several prefiltered lists onto the same tables but I isolated the problem down to the simple case described below.

I created a new List with a single jdate field. I added several rows to this table, and then switched the element's access to be editable by nobody (ie read only). On subsequent saves of rows the date field is nulled out in the database.
 
Confirmed.
Can you try to do plugins\fabrik_element\jdate\jdate.php line 32

class PlgFabrik_ElementJdate extends PlgFabrik_ElementList
 
PlgFabrik_ElementList was comment-out. Do we know why?
As the date plugin also extends from PlgFabrik_ElementList, jdate should probably be also. However jdate does not call anything in PlgFabrik_ElementList. PlgFabrik_ElementList extends from PlgFabrik_Element

One more thing to check: function getDefaultAttribs in PlgFabrik_Element is missing the defaults for jdate.
So you may need to add the same defaults for jdate as for date in that list.
 
Ah yes, that edit on jdate.php line 32, from "extends PlgFabrik_Element" to "extends PlgFabrik_ElementList" has fixed the issue reported in the simple test case and in the more complex cases where I found the issue.

Many thanks for the speedy response.
 
Status
Not open for further replies.
Back
Top