Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
teraßyte Posted February 7, 2024 Posted February 7, 2024 (edited) After a fresh install, going to "ACP > System > SETTINGS > Web App" throws a TypeError: TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given (0) #0 path\to\system\Dispatcher\Controller.php(118): IPS\core\modules\admin\settings\_webapp->manage() #1 path\to\applications\core\modules\admin\settings\webapp.php(39): IPS\Dispatcher\_Controller->execute() #2 path\to\system\Dispatcher\Dispatcher.php(153): IPS\core\modules\admin\settings\_webapp->execute() #3 path\to\admin\index.php(13): IPS\_Dispatcher->run() #4 {main} The issue is this code: /* And finally, additional manifest and livetile details */ $manifestDetails = json_decode( \IPS\Settings::i()->manifest_details, TRUE ); $form->add( new \IPS\Helpers\Form\YesNo( 'configure_manifest', \count( $manifestDetails ) > 0, FALSE, array( 'togglesOn' => array( 'manifest_shortname', 'manifest_fullname', 'manifest_description', 'manifest_defaultapp', 'manifest_themecolor', 'manifest_bgcolor', 'manifest_display', 'manifest_custom_url_toggle' ), ) ) ); The problem is that $manifestDetails at this point is NULL because the json encoded data is wrongly using square brackets: ["cache_key":1692875360] Instead of curly brackets: {"cache_key":1692875360} Edited February 7, 2024 by teraßyte SeNioR- and Safety1st 2
teraßyte Posted February 7, 2024 Author Posted February 7, 2024 The wrong JSON format also causes the manifest URL to throw an error on the front end.
Marc Posted February 7, 2024 Posted February 7, 2024 Thank you for bringing this issue to our attention! I can confirm this should be further reviewed and I have logged an internal bug report for our development team to investigate and address as necessary, in a future maintenance release.
teraßyte Posted February 9, 2024 Author Posted February 9, 2024 15 hours ago, Safety1st said: @teraßyte is there a workaround for now? None that I can think of without editing the code/database. I managed locally by temporarily altering the code to disable the json_decode line and saving the settings page. Updating the setting's default value in the DB and clearing the caches from ACP should work too. Safety1st 1
Safety1st Posted February 9, 2024 Posted February 9, 2024 I'm ready to do either, just give me instructions 😉🙏
teraßyte Posted February 9, 2024 Author Posted February 9, 2024 @Safety1st I sent you a PM. 👍 Safety1st 1
Jim M Posted February 9, 2024 Posted February 9, 2024 Please note: we do not recommend editing the core files. Any issues (whether visual, data, etc...) which are encountered by doing so are at your own risk. Some errors may only be resolved by restoring from a backup from prior to when the edits were made so be sure to take full, proper backups prior to doing anything. This is not anything directly related to terabyte but just a generalized comment to any modification. Safety1st 1
Safety1st Posted February 10, 2024 Posted February 10, 2024 (edited) After applying @teraßyte direct instructions my IPS is not accessible anymore… 😱 Then I woke up 😜 Edited February 10, 2024 by Safety1st
Solution Stuart Silvester Posted February 12, 2024 Solution Posted February 12, 2024 We have released a patch for this issue. To apply, please go to AdminCP > Support > 1st (or top left) box will have a "Optional Patch Available" link. Click it and follow the instructions. Marc and Safety1st 2
Safety1st Posted February 12, 2024 Posted February 12, 2024 I got such result during applying the patch:
Marc Posted February 13, 2024 Posted February 13, 2024 It would then appear its already present. Did you perhaps update after the patch was released? If so, you would already have it
Safety1st Posted February 13, 2024 Posted February 13, 2024 No, I didn't update my IPS after the patch was released.
Marc Posted February 13, 2024 Posted February 13, 2024 If its showing nothing to update, then you have the latest. If you want to make 100% sure, you can always upload a fresh set of files from your client area
Safety1st Posted February 13, 2024 Posted February 13, 2024 Such notifications when actions are not needed should not be red coloured. There is a standard for message style: red colour means 'alert', yellow – 'warning', green – 'OK'. Am I clear now?
Marc Posted February 13, 2024 Posted February 13, 2024 1 hour ago, Safety1st said: Such notifications when actions are not needed should not be red coloured. There is a standard for message style: red colour means 'alert', yellow – 'warning', green – 'OK'. Am I clear now? Thank you for your feedback Safety1st 1
Marc Posted March 14, 2024 Posted March 14, 2024 This has now been resolved in the 4.7.16 release. Please update if you are seeing this issue. If you are then still seeing the issue, please let us know.
Recommended Posts