Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.

Suggested fix for 1.5.7 broke wordpress #89

Closed
wants to merge 1 commit into from
Closed

Suggested fix for 1.5.7 broke wordpress #89

wants to merge 1 commit into from

Conversation

luigivieira
Copy link

As discussed in forum topic https://wordpress.org/support/topic/157-broke-wordpress?replies=19, the
update to version 1.5.7 breaks the wordpress site.

I did this quickfix to be able to use the theme locally, but other users suggested a pull request. To be honest, I am not sure this fix is the best solution because I do not know enough about the intended functionality behind the changed line and because it has been said that the current code is working perfectly in newer versions of PHP (particularly the version 5.4.23).

https://wordpress.org/support/topic/157-broke-wordpress?replies=19) the
update to version 1.5.7 breaks the wordpress site.

A quick fix was executed by changing, in file functions.php, the line:

add_filter( 'comments_popup_link_attributes', function() { return '
itemprop="discussionUrl"'; } ); # schema.org property on comments links

to

add_filter( 'comments_popup_link_attributes', "return '
itemprop=\"discussionUrl\"';" ); # schema.org property on comments links
@gaetan-petit
Copy link

@luigivieira: Are you sure this happen on 5.4.x version ?
PHP closures should be available since PHP 5.3.x : http://php.net/manual/fr/functions.anonymous.php

Also you should move from PHP 5.4.x as PHP has now a much quicker release cycle. The 5.4.x version is 3 years old now, in the meantime PHP has moved to 5.5 and enve pushed 5.6 branch.

@luigivieira
Copy link
Author

Hi @gaetan-petit. In fact, this error does not seem to happen on 5.4.x (as described in the forum thread by other users). It happened with me due to the version my hosting provider (Hostgator) currently uses: 5.2.x. I did this quick "fix" (if we can call it that way) to allow my site to work again, and another user suggested the pull request. So I submitted the request knowing that you guys would certainly be the best people to know what to do. :) As I said before, I do not know much about Wordpress/PHP to say if the proposed change really makes sense or not.

Finally, I do agree that the PHP version should be updated as soon as possible, and I am requesting my hosting provider to do exactly that. Nevertheless, it still would be nice to flat users to have a fallback in the theme code in case older versions of PHP are still in use - or at least a visible message warning them that their site would stop working if the theme is updated in sites running the wrong PHP version.

Cheers
Luiz

@ineagu
Copy link
Contributor

ineagu commented Mar 18, 2015

thanks for the contribution guys

However just to let you know some news :)

  • we acquired flat from the previous owner and since we do have our own process ( like different repo structure, not using bower/travis or grunt yet ) so for the moment we plan to keep both this repo and to create our own where we will continue the dev in our way ( not the best :D ).

I will try to keep an eye here too, also we are not used to contribution type of repo and I know is bad however for now we just wanna quickly change ownership and then figure it out :)

The new repo is : https://github.com/Codeinwp/FlatX and you can see has a more straightforward structure .

@SamPlusPlus
Copy link

If anyone else is running into this issue on shared hosting, you may want to consider the fact that you may be able to change the php version in the .htaccess file.

My host provides instructions at http://www.webhostingbuzz.com/wiki/how-to-change-php-version/

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

Successfully merging this pull request may close these issues.

4 participants