Jump to content

Featured Replies

Posted
  • Community Expert

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

Solved by Stuart Silvester

Go to solution
  • Author
  • Community Expert

The wrong JSON format also causes the manifest URL to throw an error on the front end.

  • Community Expert

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 is there a workaround for now?

  • Author
  • Community Expert
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.

I'm ready to do either, just give me instructions 😉🙏

  • Community Expert

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.

Acknowledged.

After applying @teraßyte direct instructions my IPS is not accessible anymore… 😱 Then I woke up 😜

Could contain: Page, Text

 

 

Edited by Safety1st

  • Community Expert
  • Solution

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.

I got such result during applying the patch:
Could contain: Page, Text

  • Community Expert

It would then appear its already present. Did you perhaps update after the patch was released? If so, you would already have it

No, I didn't update my IPS after the patch was released.

  • Community Expert

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

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?

  • Community Expert
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

  • 1 month later...
  • Community Expert

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.

Recently Browsing 0

  • No registered users viewing this page.