By Philippe on Sunday, 17 December 2017
Posted in Technical Issues
Replies 3
Likes 0
Views 646
Votes 0
Hello,

I observed the following thing :

If for the Workflow of a Page, I modify the Unique Key of a Custom Field, the modification takes place in the _social_fields table.

Then if I edit this Page on the front-end (without changing the data) and finally I click on "Save".
Then there is only one change in the _social_fields_data table.
And this change is the value "id".

This means that at the time of saving the Page, EasySocial deletes the original line in _social_fields_data (corresponding to the Page), to recreate a new one (with a new "id" ).

I want to understand why EasySocial bothers to regenerate an new id ?
What's the point ? The field_id remains the same.


Because, even if I modify a Unique Key, the search for a Custom Field (front-end) works very well (even if the page has not been re-save). The field_id is the value used to identify a Custom Field.

Thank you,
Philippe

You can see captures in attachments.
Hey Philippe,

If I recall correctly, we implemented a Last In First Out algorithm for the fields data. This is primarily due to the fact that EaySocial is made extensible and it isn't able to detect changes per field. Though, I need to check with our developer if this behavior has changed since version 2.1 (He's not around today)

Reason behind having this LIFO algorithm is mainly because EasySocial itself doesn't know which field has been modified or changed and cannot rely on the field app to save their own data because if you have 100 apps, then you'll end up firing 100 queries for each field to save it's own data. Not to mention that if each app has to save their own data, it's too tedious to develop custom field apps.
·
Sunday, 17 December 2017 22:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok thank you Mark for this explanation.
·
Wednesday, 20 December 2017 00:33
·
0 Likes
·
0 Votes
·
0 Comments
·
No problem Philippe
·
Wednesday, 20 December 2017 13:02
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post