Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Hazion Posted November 19, 2022 Posted November 19, 2022 I recently upgraded from 4.6.something to 4.7.4 and php 7.4 to php 8.1 while migrating my forum from one server to another. I have the commerce application purchased and enabled, but ever since the migration/upgrade the store section of my forum hasn't worked (returns a 500 error - it worked before migrating/upgrading). The following stack trace can be found in the system log when trying to navigate to the store (The URL of page the error occurred on was https://{forum}/forums/index.php?/store/): TypeError: trim(): Argument #1 ($string) must be of type string, DateInterval given (0) #0 /var/www/html/forums/system/Lang/Lang.php(1925): trim() #1 [internal function]: IPS\_Lang->IPS\{closure}() #2 /var/www/html/forums/system/Lang/Lang.php(1929): array_map() #3 /var/www/html/forums/system/Lang/Lang.php(1713): IPS\_Lang->replaceWords() #4 /var/www/html/forums/system/Output/Output.php(820): IPS\_Lang->parseOutputForDisplay() #5 /var/www/html/forums/system/Dispatcher/Dispatcher.php(173): IPS\_Output->sendOutput() #6 /var/www/html/forums/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish() #7 /var/www/html/forums/system/Dispatcher/Front.php(558): IPS\Dispatcher\_Standard->finish() #8 /var/www/html/forums/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish() #9 /var/www/html/forums/index.php(13): IPS\_Dispatcher->run() #10 {main} It should be noted that I am able to access the "Manage purchases" and "Orders" tabs just fine. The "Subscriptions" page partially works, but it only lists the first subscription and it says "Price unavailable" instead of the price. When trying to order the subscription, I get sent to a page displaying the following error: TypeError: IPS\nexus\Invoice\_Item::__construct(): Argument #2 ($price) must be of type IPS\nexus\Money, null given, called in /var/www/html/forums/applications/nexus/modules/front/subscriptions/subscriptions.php on line 209 (0) #0 /var/www/html/forums/applications/nexus/modules/front/subscriptions/subscriptions.php(209): IPS\nexus\Invoice\_Item->__construct() #1 /var/www/html/forums/system/Dispatcher/Controller.php(107): IPS\nexus\modules\front\subscriptions\_subscriptions->purchase() #2 /var/www/html/forums/applications/nexus/modules/front/subscriptions/subscriptions.php(52): IPS\Dispatcher\_Controller->execute() #3 /var/www/html/forums/system/Dispatcher/Dispatcher.php(153): IPS\nexus\modules\front\subscriptions\_subscriptions->execute() #4 /var/www/html/forums/index.php(13): IPS\_Dispatcher->run() #5 {main}
Jim M Posted November 19, 2022 Posted November 19, 2022 We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. We look forward to further assisting you.
Hazion Posted November 19, 2022 Author Posted November 19, 2022 6 hours ago, Jim M said: We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. We look forward to further assisting you. Thanks, I've updated the access information.
Solution Hazion Posted November 19, 2022 Author Solution Posted November 19, 2022 Update: I fixed the issue myself by adding the following code above the error-causing line (1929 in Lang.php): if (is_a($val, 'DateInterval')) { return 'month'; } Regardless, thank you for replying SeNioR- 1
Gary Posted November 19, 2022 Posted November 19, 2022 Hi @Hazion, Glad you managed to self-diagnose and solve your issue. If you have any further issues, please don't hesitate to get in touch with us. Hazion 1
Marc Posted November 21, 2022 Posted November 21, 2022 We wouldnt usually advise on updating files yourself, as it may cause you issues down the line. Of course if you have updated it yourself, you will need to update that file on every update, and of course it means the core issue is never actually being resolved on your system. If you would like for us to take a closer look at what is causing the actual problem, please let us know.
MediaDiGi Posted November 22, 2022 Posted November 22, 2022 When there would be a code update that will fix this issue because I also have it https://topgoldforum.com/store/ SeNioR- 1
Jim M Posted November 22, 2022 Posted November 22, 2022 1 hour ago, MediaDIGI.com said: When there would be a code update that will fix this issue because I also have it https://topgoldforum.com/store/ There would not be as the OP has chosen to resolve it themselves rather than let us investigate. If you would like us to investigate your issue, please do the following: We would need to look further into this for you, however the access details on file appear to be incorrect or missing. Could you please update these details by visiting your client area, selecting the relevant purchase, then clicking "Review/Update Access Information" under the "Stored Access Information" section. We look forward to further assisting you. MediaDiGi 1
Recommended Posts