Bug Undefined Errors [4.8.0]

Status
Not open for further replies.

Oro Jackson

Customer
While Gifting:

PHP:
Error Info
ErrorException: Undefined variable: message - library/DBTech/Shop/Action/Buyitem.php:421
Generated By: Divvens, 1 minute ago
Stack Trace
#0 /home/xxx/public_html/library/DBTech/Shop/Action/Buyitem.php(421): XenForo_Application::handlePhpError(8, 'Undefined varia...', '/home/xxx/...', 421, Array)
#1 /home/xxx/public_html/library/DBTech/Shop/Application/Core.php(333): DBTech_Shop_Action_Buyitem->actionBuyGift()
#2 /home/xxx/public_html/library/DBTech/Shop/XenForo/ControllerPublic/Shop.php(38): DBTech_Shop_Application_Core->runAction()
#3 /home/xxx/public_html/library/XenForo/FrontController.php(351): DBTech_Shop_XenForo_ControllerPublic_Shop->actionIndex()
#4 /home/xxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/xxx/public_html/index.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
  ["url"] => string(84) "https://orojackson.com/shop/wanted-upgrade-14-day-special.21/buyitem?action=buy-gift"
  ["_GET"] => array(1) {
    ["action"] => string(8) "buy-gift"
  }
  ["_POST"] => array(12) {
    ["recipient"] => string(5) "Shion"
    ["message"] => string(2) "<3"
    ["itemid"] => string(2) "21"
    ["shopid"] => string(1) "5"
    ["_xfConfirm"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["purchase"] => string(8) "Purchase"
    ["_xfRequestUri"] => string(28) "/shop/team-karoopshun.5/shop"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    ["do"] => string(7) "buyitem"
    ["id"] => int(21)
  }
}

While editing item
PHP:
Error Info
ErrorException: Undefined index: buybackcurrencyid - library/DBTech/Shop/ActionAdmin/Item.php:460
Generated By: Divvens, A moment ago
Stack Trace
#0 /home/xxx/public_html/library/DBTech/Shop/ActionAdmin/Item.php(460): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/xxx/...', 460, Array)
#1 /home/xxx/public_html/library/DBTech/Shop/Application/Core.php(333): DBTech_Shop_ActionAdmin_Item->actionModify()
#2 /home/xxx/public_html/library/DBTech/Shop/XenForo/ControllerAdmin/Shop.php(32): DBTech_Shop_Application_Core->runAction()
#3 /home/xxx/public_html/library/XenForo/FrontController.php(351): DBTech_Shop_XenForo_ControllerAdmin_Shop->actionIndex()
#4 /home/xxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/xxx/public_html/admin.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
  ["url"] => string(72) "https://orojackson.com/admin.php?dbtech-shop/item&action=modify&itemid=1"
  ["_GET"] => array(5) {
    ["dbtech-shop/item"] => string(0) ""
    ["action"] => string(6) "modify"
    ["itemid"] => string(1) "1"
    ["do"] => string(4) "item"
    ["id"] => int(0)
  }
  ["_POST"] => array(0) {
  }
}
 
I think the gifting error is not processing gifts either, it's sending the PM but not gifting the item. Was working before the bug I reported on XenForo thread was fixed.
 
I think the gifting error is not processing gifts either, it's sending the PM but not gifting the item. Was working before the bug I reported on XenForo thread was fixed.

Ok this may be a false/my bad.

Is gifting by any chance a bit delayed now, or takes time to activate on the gifted users account? A gift I sent 40 minutes back activated on the receiving users account after 30 minutes from gifting.
 
Yea, gifting isn't working. Gifting generates that error and the PM is sent but doesn't activate on the receiving users account.
 
This has already been hotfixed, can you please redownload and reuplod as well as reimport the XML?
 
I've redownloaded - reuploaded and upgraded the add-on, however the errors still persist on the same actions.

If gifting, the undefined message error.
If even just visiting an item page, it brings up the undefined buybackcurrencyid error.
(We use only 1 currency, if that helps)

And gifts don't activate automatically for the user, the user has to go and activate them in their inventory. Is this an intended change?
 
Can you try it again? I've applied another patch for the undefined variable message issue.
 
Can you try it again? I've applied another patch for the undefined variable message issue.

Yep, the undefined variable message error doesn't come up anymore after gifting. It seems fine now :)

The undefined variable buybackcurrencyid is still popping up when you go to the shop item management page (I think you already know that though)

----------

Gifting still doesn't activate it automatically but the user has to go to inventory and activate it manually after receiving the gift [not sure if this is still intentional or a mistake, if its intentional I'll update the gift PM to reflect this that the receiver needs to activate it].

Thanks!
 
This may possibly be related. Purchase date is completely wrong for some reason:
95eea5a91a427b2d0241559e545f66d0.png


Shows 1970 there XD
 
Also I'd like to give you a shout out, it must be quite a task to keep improving the add-on and also fix bugs that pop up here and there, thanks for all the awesome work you're doing :)

I think I'll purchase the branding free license just in order to support the amazing work you do.
 
The undefined variable buybackcurrencyid is still popping up when you go to the shop item management page (I think you already know that though)
I'm not seeing this anywhere at all, sorry. Can you try clicking the Repair Cache link?

The only other thing I can think of is to erase any downloaded version from your computer, then re-download and re-upload, in case there's an issue with extracting the product. We've had reports of this happen in the past, although it's very rare.
 
Last edited:
I'm not seeing this anywhere at all, sorry. Can you try clicking the Repair Cache link?

The only other thing I can think of is to erase any downloaded version from your computer, then re-download and re-upload, in case there's an issue with extracting the product. We've had reports of this happen in the past, although it's very rare.

I clicked on repair cache, still comes up.

I maintain different directories for product versions, but I'll try this tomorrow to see if its sorted out. Thanks :)

--- Just to be clear
If we go to item management page of an item that has purchase price more than 0 (free items do not generate the error)
- An ACP error pops up, the error posted on the first post of this thread.

If an item is edited/saved, the error pops up in ACP error log. Regardless of the purchase price.
----

Is the gifting thing related to this as well or is that a change in the product (since I'm not yet clear on it).

All gifts do not activate automatically -
Users need to go to shop -> inventory and then activate it from there (both active and hidden check box is unticked if they click on settings).

if this is an intentional change, please let me know :D So that I can update the phrase with instructions to activate the product for the receiver getting the gift. If this is related to the files not being updated properly and I need to do that process again I'll give it another try. This applies to all item types being gifted.

Edit: if its an intentional change, we are happy with it and there is no problems, but maybe needs to be made a bit clear in the update log for others to be clear about it? :)
 
I'm currently moving house so I don't have the time to fully investigate any issues with gifting at this time, sorry.
 
I'm currently moving house so I don't have the time to fully investigate any issues with gifting at this time, sorry.

No worries about that at all, gifting still works and the items are swapped properly between accounts. It just doesn't activate it automatically for any item type. It has to be manually activated, so for now I'll change the phrase to include activation instructions. And when/if this issue is found to be a bug and fixed I'll revert the phrase.

So take your time to look into it, no hurry :)

Thank you!
 
I have an update!

I did a clean upgrade again, deleted all folders/files from my PC and cleaned my server of all files too (I unzip on server), uploaded, unzipped and moved all files (like usual) - and it works fine now, I think some files hadn't replaced properly or were not being overwritten. It's worked flawlessly before but now it seemed to not have upgraded properly twice/thrice - or maybe it was something to do with my server cache. The buybackcurrencyid variable error no longer comes up! Thank you, and sorry for any trouble.

---------
I'll list the other things that need to be looked into (and please do so at your own time, no hurries)

- Gifting items does not automatically activate the item, the receiving user has to go to Shop -> Inventory to activate it [item has 'active' and 'hidden' both unchecked after receiving as gift].
- Item purchase date in shop -> inventory shows 1970 (wrong date/time is displayed on all items). Expiry date and time is correct, however.
---------
 
I'm unable to replicate any issues with purchase dates in shop, could you give me the step-by-step instructions for how to replicate this issue?
 
Buy/Gift any item to a user
Go to shop -> inventory
In the inventory the date shows 1970 on the item, however expiry is correct and there is no wrong calculations.

Should I give a list of item settings for the item to check out if its related to any particular item setting? (i have discard automatically after expiry enabled, if that helps).
 
Yeah I think I'll need the item settings since I can't replicate that at all using those exact steps.
 
Yeah I think I'll need the item settings since I can't replicate that at all using those exact steps.

I just upgraded to the Nov 1's update, its been fixed in that it seems (or some cache rebuild was required for the time to be set right in display).

All good now :)
 
Or not!

I've figured it out, only happens to free items that are purchased/gifted that have this wrong date showing in inventory.
 
Status
Not open for further replies.

DragonByte Shop

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
3,228
Customer rating
5.00 star(s) 3 ratings
Top