Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Undefined variable: currentFieldType - when saving a field
Status | Resolved |
Add-on / Version | Publisher 3.1.0 |
Severity | |
EE Version | 5.3.0 |
Hop Studios
Dec 18, 2019I just updated a client site to EE 5.3.0 and Publisher 3.1.0
I am getting this bug whenever I save an existing field. It is the same for all fields.
Notice
Undefined variable: currentFieldType
user/addons/publisher/Service/Schema/FieldSchema.php, line 303
Severity: E_NOTICE
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/core/Input.php, line 238
Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393
Severity: E_WARNING
I was able to resolve the issue by adjusting this line of code (mentioned above: user/addons/publisher/Service/Schema/FieldSchema.php, line 303)
change:
if ($currentFieldType !== $fieldType) {
to:
if (isset($currentFieldType) && $currentFieldType !== $fieldType) {
Seems like the $currentFieldType variable is not being set in the previous if statement.
I could provide you with staging server access, but that will take me a bit of time to get the upgrade sync’d up to staging as we have just run it on Production.
Let me know if you have any suggestions. For now, I think its OK, as the work-around I did above seems to avoid the error, and the field does save still.
Thanks,
-Rowan
Hop Studios
Dec 18, 2019
Also, i am getting this error when saving an entry:
url is: https://bcinvasives.ca/admin.php?/cp/publish/edit/entry/3129&publisher_status=draft
BoldMinded (Brian)
Dec 18, 2019
What was the previous version of EE and Publisher installed before the upgrade? Is this a custom field that is using the old schema in exp_channel_data or the new exp_channel_field_data_X table schema?
BoldMinded (Brian)
Dec 18, 2019
For that second error, on line 501 of that file, try changing this
to
BoldMinded (Brian)
Dec 18, 2019
As for the first error, I’d probably change it to this instead of checking isset()
Hop Studios
Dec 18, 2019
Hey Brian,
I have made the two changes you have mentioned to the production server, and preliminary testing looks good. I will post again if those errors or others appear relating to Publisher.
The previous version of the site was running EE 4.3.6 and Publisher 2.11.2
I presume you have a workflow to incorporate those adjustments into your next release as needed?
For now, I think we’re in good shape.
Much appreciated
-rowan
BoldMinded (Brian)
Dec 19, 2019
Yep, those changes are already in my Git repo, so they’ll be included in the next release. Thanks for pointing out the issues.