Jump to content

Null TypeError when accessing certain Gallery images


Go to solution Solved by Stuart Silvester,

Recommended Posts

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

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

  • 1 month later...

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 contain: File, Webpage, Page, Text, Monitor, Screen, Hardware, Electronics, Computer Hardware

Link to comment
Share on other sites

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 contain: File, Webpage, Page, Text, Monitor, Screen, Hardware, Electronics, Computer Hardware

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

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

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

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

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