Jump to content

[BUG 4.7.15] Fresh install throws an error trying to enter the Web App settings page


Go to solution Solved by Stuart Silvester,

Recommended Posts

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 by teraßyte
Link to comment
Share on other sites

  • teraßyte changed the title to [BUG 4.7.15] Fresh install throws an error trying to enter the Web App settings page

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...