- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022
01:13 AM
09-12-2022
01:13 AM
Error after upgrade to 2.4.4
I have own plugin running on version 2.4.1, now i want to upgrade to 2.4.4 and i have a problem with config page.
<field id="public_key" translate="label" type="textarea" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> <label>Public key</label> <frontend_model>Burka\Pay\Block\Adminhtml\System\Config\Field\Readonly</frontend_model> <backend_model>Burka\Model\Adminhtml\Keys\PublicKey</backend_model> </field>
And my Readonly class is simple
class Readonly extends Field { /** * @param AbstractElement $element * * @return string */ public function _getElementHtml(AbstractElement $element): string { $element->setData('readonly', 1); return $element->getElementHtml(); } }
And now on version 2.4.4 i got error
<style>.highlighted { background-color: #DFF7FF!important; }</style> <form action="http://localhost/admin/admin/system_config/save/key/7f44c4fb5c8ac1e094c29dee1efccff6ae7be5e8b3dc1096248a9479be251d9b/section/payment/" method="post" id="config-edit-form" enctype="multipart/form-data"> <div><input name="form_key" type="hidden" value="hmoK6HIBVhGfeWHH" /></div> <div class="accordion"> ParseError: syntax error, unexpected token "readonly", expecting identifier in /bitnami/magento/app/code/Burka/Block/Adminhtml/System/Config/Field/Readonly.php:12 Stack trace:
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-12-2022
02:57 AM
09-12-2022
02:57 AM
Re: Error after upgrade to 2.4.4
Hi @bartoszcoye941 ,
Change class name from Readonly to another name like Burkareadonly.
Seems issue occurs because of PHP 8.1 annotation incompatible with PHP 8.1
Problem Solved? Accept as Solution!
Hope it helps!
Thanks
Ankit Jasani
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2022
03:20 AM
09-14-2022
03:20 AM
Re: Error after upgrade to 2.4.4
@bartoszcoye941 CFAHome wrote:I have own plugin running on version 2.4.1, now i want to upgrade to 2.4.4 and i have a problem with config page.
<field id="public_key" translate="label" type="textarea" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0"> <label>Public key</label> <frontend_model>Burka\Pay\Block\Adminhtml\System\Config\Field\Readonly</frontend_model> <backend_model>Burka\Model\Adminhtml\Keys\PublicKey</backend_model> </field>And my Readonly class is simple
class Readonly extends Field { /** * @param AbstractElement $element * * @return string */ public function _getElementHtml(AbstractElement $element): string { $element->setData('readonly', 1); return $element->getElementHtml(); } }And now on version 2.4.4 i got error
<style>.highlighted { background-color: #DFF7FF!important; }</style> <form action="http://localhost/admin/admin/system_config/save/key/7f44c4fb5c8ac1e094c29dee1efccff6ae7be5e8b3dc1096248a9479be251d9b/section/payment/" method="post" id="config-edit-form" enctype="multipart/form-data"> <div><input name="form_key" type="hidden" value="hmoK6HIBVhGfeWHH" /></div> <div class="accordion"> ParseError: syntax error, unexpected token "readonly", expecting identifier in /bitnami/magento/app/code/Burka/Block/Adminhtml/System/Config/Field/Readonly.php:12 Stack trace:
I appreciate the information and advice you have shared. I will try to figure it out for more.