You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug has existed since 2008 and I think will allow some better error messages for fields. In fact, I think this limitation was discovered when building the Members extension by @michael-e but I never noticed the subtle bug.
Inside the Entry->setDataFromPost method lies this line, which essentially logs an error message against a field_id. If something goes wrong in the processRawFieldData function, these lines are meant to display the error message.
The problem is that $m is never set, so the error message will always be There was a problem rendering this page. Please check the activity log for more details.!!
The signature for processRawFieldData needs to be updated to mostly mirror checkPostFieldData($data, &$message, $entry_id = null). Therefore processRawFieldData($data, &$status, $simulate=false, $entry_id=null) would become processRawFieldData($data, &$status, &$message, $simulate=false, $entry_id=null).
This is a breaking API change and will require all developers who have Field extensions to update their extensions, but I feel it's better in the long run than tacking $message onto the end of the current signature.
It will land in 2.3 (and not 2.2.5) for this reason.
The text was updated successfully, but these errors were encountered:
Passes $message as the third parameter to processRawFieldData, pushed $simulate back to the fourth parameter (updates all the core fields - SBL tbd)
The $errors parameter from Entry->setDataFromPost will now return an associative array of field_id => message. This is now consistent with Entry->checkPostData.
If there are errors during Entry->setDataFromPost on publish pages, the errors will be returned one by one making use of 2.3's multiple alerts (which still need UX/UI work)
The Event logic has been updated so that if a field fails during processing, the return output is now consistent with the other errors from Events (returns a @message, @label attributes).
Is there a resource anywhere (in the wiki for example) that gathers all breaking changes? Maybe even listing functions that have been removed from the core?
This bug has existed since 2008 and I think will allow some better error messages for fields. In fact, I think this limitation was discovered when building the Members extension by @michael-e but I never noticed the subtle bug.
Inside the
Entry->setDataFromPost
method lies this line, which essentially logs an error message against afield_id
. If something goes wrong in theprocessRawFieldData
function, these lines are meant to display the error message.The problem is that
$m
is never set, so the error message will always beThere was a problem rendering this page. Please check the activity log for more details.
!!The signature for
processRawFieldData
needs to be updated to mostly mirrorcheckPostFieldData($data, &$message, $entry_id = null)
. ThereforeprocessRawFieldData($data, &$status, $simulate=false, $entry_id=null)
would becomeprocessRawFieldData($data, &$status, &$message, $simulate=false, $entry_id=null)
.This is a breaking API change and will require all developers who have Field extensions to update their extensions, but I feel it's better in the long run than tacking
$message
onto the end of the current signature.It will land in 2.3 (and not 2.2.5) for this reason.
The text was updated successfully, but these errors were encountered: