DragonByte Tech
Well-known member
- Affected version
- 2.0.2
I have the following template modification:
(Defining this function as a getter caused conflicts, hence why I call the function directly.)
During 80% of the add-on uninstallation process, the following was displayed on the screen:
This would be displayed everywhere, front-end and AdminCP alike.
If possible, perhaps reverting template modifications should be moved to the start of the uninstall process so that such errors are not stuck waiting for templates and phrases to be deleted first (of which my mod has very, very many )
Fillip
XML:
<modification type="public" template="helper_js_global" modification_key="dbtech_ecommerce_total_unread" description="Update the "total unread" counter" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[$xf.visitor.conversations_unread + $xf.visitor.alerts_unread]]></find>
<replace><![CDATA[$0 + $xf.visitor.getDbtechEcommerceCartItems()]]></replace>
</modification>
getDbtechEcommerceCartItems
is a custom extension to XF\Entity\User:
PHP:
public function getDbtechEcommerceCartItems()
{
if ($this->user_id)
{
return $this->dbtech_ecommerce_cart_items;
}
return $this->app()->request()->getCookie('dbtechEcommerceCartItems', 0);
}
During 80% of the add-on uninstallation process, the following was displayed on the screen:
Code:
Template public:helper_js_global: Method getDbtechEcommerceCartItems is not callable on the given object (XF\Entity\User) (src\XF\Template\Templater.php:932)
Template public:helper_js_global: number_format() expects parameter 1 to be float, string given (src\XF\Language.php:804)
Template public:helper_js_global: Method getDbtechEcommerceCartItems is not callable on the given object (XF\Entity\User) (src\XF\Template\Templater.php:932)
Template public:helper_js_global: A non-numeric value encountered (internal_data\code_cache\templates\l1\s0\public\helper_js_global.php:109)
This would be displayed everywhere, front-end and AdminCP alike.
If possible, perhaps reverting template modifications should be moved to the start of the uninstall process so that such errors are not stuck waiting for templates and phrases to be deleted first (of which my mod has very, very many )
Fillip