Solved Bugs. Bugs everywhere.

NikitOS

Registered
Registered
Upgrade Coupons
Credit System
Joined
May 15, 2020
Messages
23
Reaction score
7
Hello

Found some more bugs and mistakes.

1. "Test" instead of the name of the upgrade indicating the duration.
1. Click "purchase" on any upgrade.
2. In the pop-up window in the "duration" menu, select any promotion created through [Xen-Soule] User Upgrade Duration (does not work on duration created by XenForo)
3. In the "promo code" field, enter a valid promo code, then click "apply".
4. The name of the field with the choice of the payment profile will change to "test", instead of the name of the upgrade.

Demo

2. Errors that occur when you press the "enter" button in the input field of the promo code when the duration created through [Xen-Soule] Upgrade Coupons.
1. Click "purchase" on any upgrade.
2. In the pop-up window in the "duration" menu, select any promotion created through [Xen-Soule] User Upgrade Duration (does not work on duration created by XenForo)
3. Place the cursor in the input field of the promo code and press the "enter" button.
4. An error will occur.

The error that occurs when using PHP 7.1 and 7.2: ErrorException: [E_NOTICE] Trying to get property of non-object src/addons/XenSoluce/UpgradeCoupons/XF/Purchasable/UserUpgrade.php:31
Code:
#0 src/addons/XenSoluce/UpgradeCoupons/XF/Purchasable/UserUpgrade.php(31): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/sites/mvdev.ml...', 31, Array)
#1 src/addons/XenSoluce/UserUpgradeDuration/XF/Purchasable/UserUpgrade.php(43): XenSoluce\UpgradeCoupons\XF\Purchasable\UserUpgrade->getPurchaseFromRequest(Object(XF\Http\Request), Object(SV\SignupAbuseBlocking\XF\Entity\User), NULL)
#2 src/XF/Pub/Controller/Purchase.php(21): XenSoluce\UserUpgradeDuration\XF\Purchasable\UserUpgrade->getPurchaseFromRequest(Object(XF\Http\Request), Object(SV\SignupAbuseBlocking\XF\Entity\User), NULL)
#3 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Purchase->actionIndex(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Purchase', 'Index', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Purchase), NULL)
#5 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Purchase), NULL)
#6 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#8 src/XF.php(391): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}
The error that occurs when using PHP 7.4: ErrorException: [E_NOTICE] Trying to get property 'uud_id' of non-object src/addons/XenSoluce/UpgradeCoupons/XF/Purchasable/UserUpgrade.php:31
Code:
#0 src/addons/XenSoluce/UpgradeCoupons/XF/Purchasable/UserUpgrade.php(31): XF::handlePhpError(8, '[E_NOTICE] Tryi...', '/sites/mvdev.ml...', 31, Array)
#1 src/addons/XenSoluce/UserUpgradeDuration/XF/Purchasable/UserUpgrade.php(43): XenSoluce\UpgradeCoupons\XF\Purchasable\UserUpgrade->getPurchaseFromRequest(Object(XF\Http\Request), Object(SV\SignupAbuseBlocking\XF\Entity\User), NULL)
#2 src/XF/Pub/Controller/Purchase.php(21): XenSoluce\UserUpgradeDuration\XF\Purchasable\UserUpgrade->getPurchaseFromRequest(Object(XF\Http\Request), Object(SV\SignupAbuseBlocking\XF\Entity\User), NULL)
#3 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Purchase->actionIndex(Object(XF\Mvc\ParameterBag))
#4 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Purchase', 'Index', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Purchase), NULL)
#5 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Purchase), NULL)
#6 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#8 src/XF.php(391): XF\App->run()
#9 index.php(20): XF::runApp('XF\\Pub\\App')
#10 {main}

Demo 1. Demo 2.

3. An error in the error text when you click on the "apply" button without entering a coupon.
As for me, a simple “Please enter a promo code before applying” would be much better. Hello, Google.Translate :D
1589640213129.png
 
Last edited:
Hello,

This should be fixed in the next update : 2.0.2 Fix 2 ! (y)

Regards, CRUEL-MODZ
 
Bugs again

1. For the phrase xs_uc_price_for_x_y, the duration of the parent upgrade is used, but the duration of the [Xen-Soule] User Upgrade Duration is not taken into account:
One day equals ten years :D

2. XF does not contain the phrases “month”, “day”, “year”, etc., therefore, the price and duration after choosing the duration [Xen-Soule] User Upgrade Duration remain untranslated:

1589657718325.png
 
For the phrase xs_uc_price_for_x_y, the duration of the parent upgrade is used, but the duration of the [Xen-Soule] User Upgrade Duration is not taken into account:
I didn't get it, because for me, everything works.
 
Yes. Do not leave the same phrase untranslated.
Duration after applying the coupon is not possible to translate, that is, the phrases “years”, “months”, “days” are static for any language.
 
for the translate this santance : Screenshot the sentence is: xs_uud_price_for_x

It's okay? There's no more mistakes?
 
yes, it will be corrected in the next update I can publish, but if there is another error, please let me know before I publish the update.
 
For durations, the templaterFnPhraseDuration function in the Listener is used in the selection menu, which substitutes the price and duration into the phrase, while in the [Xen-Soule] Upgrade Cupons template this is used:
Code:
{{ phrase('xs_uc_price_for_x_y', {
'price': {$price|currency($upgrade.cost_currency)},
'x' : {$upgrade.length_amount},
'y' : {$upgrade.length_unit}}) }}
It turns out that after translating the phrase xs_uc_price_for_x_y we get something like (X (currency) for {parent length_amount} {parent length_unit})

That is, no matter what duration we choose, here we will see the duration of the parent product and the price for the selected duration.
Rather, it is a compatibility error than something else.
 
if I don't hear from you by tomorrow night, that means there are no more mistakes and I'll share the update.
 
Top Bottom