Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted October 31, 20222 yr My cleanup task has seemingly NEVER completed (not lately, anyway): It gives this error when run manually: As text, that's: TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given (0) #0 /path/to/site/system/Widget/Widget.php(1009): IPS\cms\_Widget::getUniqueIds() #1 /path/to/site/applications/core/tasks/cleanup.php(263): IPS\_Widget::emptyTrash() #2 /path/to/site/system/Task/Task.php(274): IPS\core\tasks\_cleanup->execute() #3 /path/to/site/applications/core/modules/admin/settings/advanced.php(754): IPS\_Task->run() #4 /path/to/site/system/Dispatcher/Controller.php(107): IPS\core\modules\admin\settings\_advanced->runTask() #5 /path/to/site/applications/core/modules/admin/settings/advanced.php(38): IPS\Dispatcher\_Controller->execute() #6 /path/to/site/system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\settings\_advanced->execute() #7 /path/to/site/adminstuff/index.php(13): IPS\_Dispatcher->run() #8 {main} I've just now started looking into it. IPS 4.7.3, PHP 8.1. No patches available. Edited October 31, 20222 yr by iacas
October 31, 20222 yr I've split your post to its own topic. As a first step, please disable all 3rd-party apps, plugins, and Themes, then set an unedited Theme as the default for the front end. Once that has been done, run the task manually again. If it finishes without error, one of your 3rd-party items is causing the error and you'd need to contact its author for assistance. But if the same error happens after disabling them, please post a reply here and also make sure to provide access details (in the Client Area) so that we can investigate.
November 2, 20222 yr Author When you split this into its own topic, I lose the follow, so I didn't even see that you posted this reply until I went to look for my own post.
November 2, 20222 yr Author I'd already done those steps in trying to figure it out before, but I did them again just now and it still generates the error. It happens on a default theme (even though it's not tied to a theme, and my theme is a lightly modified child theme), and I disabled all third-party plugins and applications. The details in the support thing should be accurate. I manually ran all the other "cleanup" tasks, but the main "cleanup" one still generates the error above. Edited November 2, 20222 yr by iacas
November 4, 20222 yr Community Expert It doesnt seem anyone has asked which site this is for. Please could you let us know? Also ensure your access details are up to date if they arent already
November 10, 20222 yr Community Expert Sorry for the delay there. It seems your post had been missed for some reason 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.
November 10, 20222 yr Author 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. The access credentials are all correct except the SFTP stuff. I'm waiting on something for that. It'll be updated to what's on file, so it may begin working again (the SFTP stuff) before I'm able to get back here to say so. But everything else - admin panel access - is correct.
November 10, 20222 yr Community Expert It's the ftp details we need also in order to resolve the issue. Please let us know once that is ready
November 17, 20222 yr Author It's the ftp details we need also in order to resolve the issue. Please let us know once that is ready Should be set.
November 17, 20222 yr Solution Thanks, I can confirm that we fixed this bug in our next maintenance release. ( I have applied the patch to your system to confirm that nothing else is broken) so you should be fine now. Please keep in mind that because of these changes, your support tool will show now that some original IPS files were customized!
November 17, 20222 yr Author Thanks, I can confirm that we fixed this bug in our next maintenance release. ( I have applied the patch to your system to confirm that nothing else is broken) so you should be fine now. Please keep in mind that because of these changes, your support tool will show now that some original IPS files were customized! Thanks. Should I apply this patch, and then restore the Widget.php files that you modified? Or does this patch include that fix (it doesn't seem to)?
November 17, 20222 yr It shouldn't touch your Widget.php files( 2 files were changed, one in the CMS and one in the system directory )
November 17, 20222 yr Author Well, okay. I made a backup of the modified file(s), because the patch did modify those files, so I was able to quickly revert to put the fix back in. For others, or myself if I goof in the near future… if ( \count( $data ) ) became if ( is_countable( $data ) AND \count( $data ) ) Thank you. All set now. Edited November 17, 20222 yr by iacas Clarified