PBarton Posted October 19, 2022 Share Posted October 19, 2022 I've recently made an attempt to restore gallery images from an older backup of the forum. The restored images display fine in Categories and Albums, but when clicked through they display this error message: TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given (0) #0 /home/pyracypub/pyracy.com/system/Dispatcher/Controller.php(118): IPS\gallery\modules\front\gallery\_view->manage() #1 /home/pyracypub/pyracy.com/system/Content/Controller.php(50): IPS\Dispatcher\_Controller->execute() #2 /home/pyracypub/pyracy.com/applications/gallery/modules/front/gallery/view.php(65): IPS\Content\_Controller->execute() #3 /home/pyracypub/pyracy.com/system/Dispatcher/Dispatcher.php(153): IPS\gallery\modules\front\gallery\_view->execute() #4 /home/pyracypub/pyracy.com/index.php(13): IPS\_Dispatcher->run() #5 {main} I've taken a look at the view.php but I can't locate which array variable is returning null. Link to comment Share on other sites More sharing options...
Marc Posted October 19, 2022 Share Posted October 19, 2022 Please could you provide an example I can take a look at? Link to comment Share on other sites More sharing options...
PBarton Posted October 19, 2022 Author Share Posted October 19, 2022 First image: The gallery populated with images. Second image: Newer images display properly as intended when clicked. Third image: Restored images throw the aforementioned error when clicked. Link to comment Share on other sites More sharing options...
Jim M Posted October 19, 2022 Share Posted October 19, 2022 Could you please try this on an unmodified theme? If you're still having issues, please provide us the URL to the image where you're encountering this with. Link to comment Share on other sites More sharing options...
PBarton Posted October 19, 2022 Author Share Posted October 19, 2022 I get the same results on both the modified and unmodified theme. There are about 3,500 restored images and all of them have this problem, but this is the URL of one of the effected images: http://pyracy.com/gallery/image/4295-img-4139/?context=new&lightbox=1 Link to comment Share on other sites More sharing options...
Jim M Posted October 19, 2022 Share Posted October 19, 2022 Could you please clarify how you "restored" these images? Link to comment Share on other sites More sharing options...
PBarton Posted October 19, 2022 Author Share Posted October 19, 2022 I restored them via SQL inserts, from an older backup of the forum. Link to comment Share on other sites More sharing options...
Jim M Posted October 19, 2022 Share Posted October 19, 2022 2 minutes ago, Paul Barton said: I restored them via SQL inserts, from an older backup of the forum. I'm afraid, manual queries to the database would be outside our scope of support. As there are many relational tables involved with this process, we do not recommend doing this unless you are comfortable resolving all outcomes. Link to comment Share on other sites More sharing options...
PBarton Posted October 19, 2022 Author Share Posted October 19, 2022 Is there a supported or suggested way of restoring old backups? Link to comment Share on other sites More sharing options...
Jim M Posted October 19, 2022 Share Posted October 19, 2022 Just now, Paul Barton said: Is there a supported or suggested way of restoring old backups? You would want to restore the full database. Link to comment Share on other sites More sharing options...
Marc Posted October 20, 2022 Share Posted October 20, 2022 I have created a ticket fo you on this so we can take a look and see whats going on. If you are doing a full restore instead, please let us know Link to comment Share on other sites More sharing options...
PBarton Posted November 23, 2022 Author Share Posted November 23, 2022 I've since paid one of the IPC 3rd Party Support Developers, teraByte to bring back/restore the board from scratch. Everything works great now, except I found one gallery that gives me the same error when selected through "Featured Images" - no matter if the board theme is modified or unmodified. Link to comment Share on other sites More sharing options...
Jim M Posted November 23, 2022 Share Posted November 23, 2022 12 minutes ago, PBarton said: I've since paid one of the IPC 3rd Party Support Developers, teraByte to bring back/restore the board from scratch. Everything works great now, except I found one gallery that gives me the same error when selected through "Featured Images" - no matter if the board theme is modified or unmodified. Could you please elaborate on what was done? If something was done which was modifying existing tables/data, you would need to continue with your third-party provider. If this is a plain installation again, without modifications to the database, we would need the URL of the issue. Link to comment Share on other sites More sharing options...
teraßyte Posted November 23, 2022 Share Posted November 23, 2022 6 minutes ago, Jim M said: Could you please elaborate on what was done? If something was done which was modifying existing tables/data, you would need to continue with your third-party provider. If this is a plain installation again, without modifications to the database, we would need the URL of the issue. @Jim M I restored a full backup from a 3.x version and then upgraded it to 4.7.4. The forum currently has only 1 plugin installed, but the error can still be reproduced after disabling it and testing on the default theme. I also saw this topic and verified with the query posted in the solution but there were 0 results: Link to comment Share on other sites More sharing options...
Solution Stuart Silvester Posted November 23, 2022 Solution Share Posted November 23, 2022 Just a heads up, this issue where there's missing meta data has been fixed in 4.7.5 Beta 1. Link to comment Share on other sites More sharing options...
teraßyte Posted November 23, 2022 Share Posted November 23, 2022 3 minutes ago, Stuart Silvester said: Just a heads up, this issue where there's missing meta data has been fixed in 4.7.5 Beta 1. Is the issue you're talking about different from the topic/query I linked above? Because if the issue is the field having the text string NULL instead of being NULL itself it's not the solution in this case. Link to comment Share on other sites More sharing options...
Stuart Silvester Posted November 23, 2022 Share Posted November 23, 2022 1 minute ago, teraßyte said: Is the issue you're talking about different from the topic/query I linked above? Because if the issue is the field having the text string NULL instead of being NULL itself it's not the solution in this case. The change will also apply to that issue and allow the page to load teraßyte 1 Link to comment Share on other sites More sharing options...
Recommended Posts