Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Template Tags - Hot Topics - PHP 7 Fatal Error
Avatar
Jonathan Yee
Member
Free Members
Offline
May 6, 2020 - 3:10 pm

( ! ) Fatal error: Uncaught Error: [] operator not supported for strings in /Users/jyee/Local Sites/simple-press/app/public/wp-content/sp-resources/forum-plugins/template-tags/library/sp-HotTopics-tag.php on line 85

 

I think the error is in line 75.  $forumList is initialized as a string when it should be an array.

Avatar
SP Community Support
SP Moderator
Offline
May 6, 2020 - 3:27 pm

Hi:

Can you clarify how you were able to get this error? Did you get it by just activating the template-tags plugin?  Or was it when you were trying to use one of the tags?  And if so, where did you put the tag? 

Also, what Simple:Press theme are you running?

Thanks.

Avatar
SP Community Support
SP Moderator
Offline
May 6, 2020 - 3:29 pm

Also, you can try changing that line 75 to:

$forumList = array();

I haven't tested it yet but it should work to at least get you out of the fatal error without having to disable the plugin.

Thanks

Avatar
Jonathan Yee
Member
Free Members
Offline
May 6, 2020 - 4:29 pm

I am using the Modern 2020 theme with the WP 2020 Theme Colors overlay.

I got the error by using the shortcode (with no options) for Hot Topics.

I tried changing that line, but that file keeps changing back.  Does the plugin keep refreshing its files?  Weird!

Avatar
SP Community Support
SP Moderator
Offline
May 6, 2020 - 4:34 pm

It keeps changing back?  That's strange.  The plugin has no way to rewrite its own files so something else must be putting the original file back.  Two things I can think of:

1. Maybe you have a security plugin that monitors file changes and resets the files

2. Maybe the changed file isn't being uploaded at all because the folder isn't writable with the sFTP login being used.

Another thing to try is to disable the PREMIUM PLUGINS plugin - just in case that is somehow getting run again for some reason. That's the only plugin that can rewrite files (since its job is to install the plugins in the first place).

Thanks.

Avatar
Jonathan Yee
Member
Free Members
Offline
May 6, 2020 - 6:00 pm

I will try deactivating/deleting the premium plugin.  I think that is the problem.

Also, when I try to use Gutenberg or Elementor, I get a very nasty fatal error.  Can you help me?

Fatal error: Uncaught Error: Call to undefined function sp_abort_display_forum() in /Users/jyee/Local Sites/simple-press/app/public/wp-content/sp-resources/forum-plugins/template-tags/library/sp-HotTopics-tag.php on line 34

Avatar
SP Community Support
SP Moderator
Offline
May 6, 2020 - 6:06 pm

Yeah, the shortcodes haven't been formally tested inside pagebuilders so using them in there is luck-of-the-draw.

But, have you tried disabling other WP plugins to make sure that they aren't conflicting with something?

Thanks.

Avatar
Jonathan Yee
Member
Free Members
Offline
May 8, 2020 - 1:40 pm

Yes, this is in a clean test site with no other plugins.

Do you know if you will be updating the plugin to work with Gutenberg?

Avatar
SP Community Support
SP Moderator
Offline
May 10, 2020 - 8:25 pm

Hi:

The issue wasn't Gutenberg - there was indeed a bug we could replicate in the HOTTOPICS shortcode and template tag.  That's been fixed and a new version pushed. You should be able to update to it either automatically from your WP dashboard or download from your account screen.

Let me know if that resolves the issue for you.

Thanks.

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625