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
Blog Post Linking Plugin Throws Header Error
Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Aug 14, 2019 - 12:36 pm

Interesting anomaly here...I searched but found no similar reports.

Last night the forums were working great. No WP or SP updates were performed since then. This morning, all forum pages fail to load, only displaying white page of death with the error:

Error thrown

Call to undefined function sp_linking_do_header()

Troubleshooting Performed:

No related errors or in SP Error Log.

No error displayed with Blog Post Linking AND Auto Linking plugins deactivated.

No Error with Auto Linking plugin activated.

With Blog Post Linking active, error is thrown.

Reset SP Script Cache...activate BPL = error.

Update BPL Options... error.

Flush General Cache... error.

Clean Up Transients... error.

Re-check SP Error Log:

14 August 2019 10:02 am | spaErrError | 10 | databasefile: /home/user/public_html/wp-content/sp-resources/forum-plugins/blog-linking/sp-linking-plugin.php
line: 267
function: sp_linking_do_install
error: Duplicate key name 'post_idx'

ALTER TABLE wp_x_sflinks ADD KEY post_idx (post_id), ADD KEY forum_idx (forum_id), ADD KEY topic_idx (topic_id);

Check Table via PHP MyAdmin:
wp_x_sflinks check status OK

Analyze table:
wp_x_sflinks analyze status OK

Optimize Table:
wp_x_sflinks optimize note Table does not support optimize, doing recreate + ...
wp_x_sflinks optimize status OK

Reactivate Blog Post Linkng... error persists.

BPL Plugin is currently deactivated and our Tripawds forums are functioning as expected with no errors.

What further steps can I take to identify the cause of this issue and get it resolved?

Thanks in advance for the help!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Aug 14, 2019 - 12:57 pm

Can you post the full error from the wordpress debug.log file for "Call to undefined function sp_linking_do_header()"?  Usually it includes a nested series of paths with that kind of error that shows the various interim function calls before the error is thrown.

Thanks.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Aug 14, 2019 - 1:52 pm

Simple Press said
post the full error from the wordpress debug.log file for...

Yuck, whole bunch o' stuff in the error logs related to the x error. Some may be related to my troubleshooting, but nothing specifically mentioning sp_linking_do_header().

Will send text file via PM.

Thanks for the quick response!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Aug 14, 2019 - 2:02 pm

Looks like the PM didn't contain the text file.  But maybe one thing to try would be to delete the blog linking plugin complete and then upload and reinstall it.  Maybe a file it needs got deleted or corrupted somehow.

Thanks.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Aug 14, 2019 - 2:18 pm

Simple Press said
Looks like the PM didn't contain the text file... 

Resent it, however...

FYI: After restarting Apache and PHP-FPM, the forums are now loading again without the error page displayed. BUT: I am still seeing this error in the server logs:

[14-Aug-2019 18:10:21 UTC] WordPress database error Duplicate key name 'post_idx' for query ALTER TABLE wp_1_sflinks ADD KEY post_idx (post_
id), ADD KEY forum_idx (forum_id), ADD KEY topic_idx (topic_id); made by include('/plugins/simplepress/admin/panel-plugins/spa-plugins.php')
, spa_save_plugin_activation, spcPlugin->activate, do_action('sph_activate_blog-linking/sp-linking-plugin.php'), WP_Hook->do_action, WP_Hook
->apply_filters, sp_linking_install, sp_linking_do_install, spcDB->execute
[14-Aug-2019 18:10:21 UTC] WordPress database error Duplicate key name 'blog_post_idx' for query ALTER TABLE wp_1_sftopics ADD KEY blog_post
_idx (blog_post_id); made by include('/plugins/simplepress/admin/panel-plugins/spa-plugins.php'), spa_save_plugin_activation, spcPlugin->act
ivate, do_action('sph_activate_blog-linking/sp-linking-plugin.php'), WP_Hook->do_action, WP_Hook->apply_filters, sp_linking_install, sp_link
ing_do_install, spcDB->execute

Darn Gremlins...

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Aug 14, 2019 - 3:00 pm

Hi:

It looks like perhaps its attempting to perform some sort of upgrade to the database for the blog linking tables that might have been performed before.  So, perhaps the best thing to do is to delete the two indexes on the SFLINKS table that its complaining about and just let it recreate it.

That should allow the upgrade routine to complete properly on that table which would set the flag that tells it never to run again.  Its weird because that upgrade routine was supposed to be run all the way back when 5.0.0 was released.

Thanks.

Avatar
jim
Here and Now
Member
Pro Subscribers
sp_UserOfflineSmall Offline
Aug 16, 2019 - 2:36 pm

Simple Press said

...the best thing to do is to delete the two indexes on the SFLINKS table that its complaining about and just let it recreate it.

Interestingly, I'm no longer seeing this error in the SF error log, or server error logs after clearing the logs and reloading various forum pages.

If it reoccurs, could you please confirm the following:

To delete these indexes, can it be done via the Rebuild Indexes option in the SF Housekeeping Toolbox?

Or, do I Drop these indexes using PHP MyAdmin?

TABLE wp_x_sflinks
  KEY post_idx (post_id)
  KEY forum_idx (forum_id)
  KEY topic_idx (topic_id)

Screen-Shot-2019-08-16-at-11.03.14-AM.pngImage Enlarger

There is no index for blog_post_idx in sflinks table, so should I also Drop this index:

TABLE wp_x_sftopics
  KEY blog_post_idx (blog_post_id)

Before i break anything, please also confirm that these indexes will rebuild automatically if I do drop them.

Thanks again!

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Simple Press
Admin
sp_UserOfflineSmall Offline
Aug 18, 2019 - 9:06 pm

Hi:

Using the REBUILD indexes will not run the installation routine that sets the flag.  

But, since the problem is no longer occurring, it could be something else that's triggering it - it sounds as if the issue is intermittent - and that kind of negates my original theory.  So, there's no guarantee that once the indexes are dropped that the installation routine will run.  But its still worth a shot.  But, definitely back up the database before dropping the indexes - this way if they're not re-created you can restore the db.

The indexes that should be dropped would be:

- post_idx

- forum_idx

- topic_idx

And on the SPTOPICS table, 

- blog_post_idx

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626