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
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

  • Recently Browsing   0 members

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