Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error when using shortcode #4

Closed
chrisaldrich opened this issue Dec 31, 2016 · 5 comments
Closed

Fatal error when using shortcode #4

chrisaldrich opened this issue Dec 31, 2016 · 5 comments

Comments

@chrisaldrich
Copy link

Old posts which have the aggregator's short code in them now throw a fatal error. (eg: http://boffosocko.com/2016/06/18/a-new-thermodynamics-theory-of-the-origin-of-life-quanta-magazine/)

Removing the short code from the post causes the error to resolve.

I suspect that it may be as a result of the recent upgrade to WordPress 4.7, but the error notice pasted below may prove additional details.

Has anyone else encountered this?

Fatal error: Uncaught Error: Call to undefined function split() in /wp-content/plugins/hypothesis_aggregator-master/hypothesis-aggregator.php:140 Stack trace: #0 /wp-includes/shortcodes.php(345): hypothesis_shortcode(Array, '', 'hypothesis') #1 [internal function]: do_shortcode_tag(Array) #2 /wp-includes/shortcodes.php(223): preg_replace_callback('/\\[(\\[?)(hypoth...', 'do_shortcode_ta...', '<p>References:<...') #3 /wp-includes/class-wp-hook.php(298): do_shortcode('<p>References:<...') #4 /wp-includes/plugin.php(203): WP_Hook->apply_filters('<p>References:<...', Array) #5 /wp-includes/post-template.php(240): apply_filters('the_content', 'References:\n\n<u...') #6 /wp-content/themes/twentysixteen/template-parts/content-single.php(22): the_c in /wp-content/plugins/hypothesis_aggregator-master/hypothesis-aggregator.php on line 140

@xolotl
Copy link
Contributor

xolotl commented Mar 17, 2017

I think this is due to PHP7 incompatibility with PHP split(). I think I addressed it with now merged: aa16da1

@xolotl
Copy link
Contributor

xolotl commented Mar 17, 2017

Actually, on closer examination, I needed to adjust the fix I mentioned above and have done so with this PR: #7

@chrisaldrich
Copy link
Author

Sadly, I hadn't thought to check the PHP version, though mostly because my host apparently did a forced upgrade to 7.

You've just updated with another PR as I'm writing this. Does the new one fix the Currated by _____ piece? The intermediate code wasn't returning the user name or the correct URL for that user?

@chrisaldrich
Copy link
Author

Yes, that tweak (#7) does appear to work. It fixes both the fatal error and the fact that the curator name and appropriate URL wasn't working.

Great "marketing" work @xolotl! ;)

@xolotl
Copy link
Contributor

xolotl commented Mar 22, 2017

Yes, the fixes I contributed are designed to address PHP7 compatibility, make the links to annotations include the annotation client by proxy in case someone doesn't have the extension, and fix the link to the curator that I broke in an earlier fix ;)

The "new face" of marketing apparently includes some facility with code ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants