PHP 7.0 breaks inFocus

open (4 posts) (3 voices)

  1. ian
    Member

    The site I posted about here - http://mysitemyway.com/support/topic/wordpress-47-seems-ok - running inFocus 3.9 & WP 4.7 had its PHP version upgraded by the hosting company yesterday from 5.6 to 7.0 (on their recommendation I should add). I never checked what happened (my bad...) but the client contacted me today to say "site broken"...

    I got the hosters to revert back to 5.6 and the site is now working again. PHP 5.6 has a current EOL of Dec 31 2018 so that gives me 2 years to figure out what to do, providing of course WordPress doesn't break the site with an update in the meantime. :-(

    @OnePressTech - I know you cannot touch inFocus as part of BackStop but have you tested your BS themes on PHP 7.0, and did you find any problems and fix them?

    If there's an MSMY code module you had to fix for PHP 7.0 can you direct me to it and the changes required? With luck, said MSMY code module(s) might be common to inFocus so I can try to apply the same fixes (which I can do as I am the theme purchaser). Might not work / be applicable but worth a shot.

    Posted 7 months ago #
  2. OnePressTech
    Member

    You will find the bulk of the changes for WP4.6.1 / PHP7 at the following link:

    https://gitlab.com/BackStopThemes/FrameworkV1.0/commit/bce28ef8a0ede56b914abf360a29f57a99a6ff6d

    Most of the changes were for WP4.6.1 compatibility. The main changes for PHP7 were:

    1) widget classes were not declaring / using a php7 compliant constructor. I adjusted the code to retain php5.4 compliant constructor as well so the software can operate regardless of the php version installed. Constructor order is important if you want to eliminate the php7 warning...php7-compliant constructor first, php5.4 compliant constructor second.

    2) There were a couple of null object instances that needed a null check to catch

    3) $this->$option['type']( $option ); is not parsed the same way in php7 as it was in php5.x. In php7 the equivalent is $this->{$option['type']}( $option ); It is a subtle change but notice the brace brackets.

    Additional changes to get rid of WP4.6.1 warnings can be found here:

    https://gitlab.com/BackStopThemes/ConstructSkinFrameV1.0/commit/f6e6231406db55f2065b002384ab82beb6d587b9

    Hope that helps.

    Cheers,
    Tim

    Managing Director
    OnePressTech Pty Ltd

    Posted 7 months ago #
  3. Hi, I posted a couple issues I've experienced in moving to 4.7 here: http://mysitemyway.com/support/topic/wordpress-47-seems-ok#post-166001

    I also wanted to note that since 4.6.x and moving to a new host that requires php7 (or at least they only support and guarantee performance on php7) that just changing the code as noted in #3 above by OnePressTech — the site worked and backend fine.

    However, since 4.7 issues with the WP dashboard in editing posts, skins, and short code generator from MSMY are broken — have you experienced this?

    Posted 7 months ago #
  4. OnePressTech
    Member

    I have experienced these bugs and expect they are jQuery issues / conflicts. I have been experiencing your bug #2 (can't switch from Visual to text mode) since 4.6.1 on PHP5.4.

    I have scheduled to analyse / fix jQuery issues in the V1.0.2 version of BackStop Themes due to be released in January.

    NOTE: Regarding switch from MSMW-->BackStop Theme V1.0.1...I recommend caution. I found a glitch in the MSMW --> BackStop theme replacement process that may muck up the contents of the last widget in the widget list. Ensure you have a backup and can restore it if you have switch-over issues. I'll be looking to fix that in the V1.0.2 release after Christmas. If you just manually apply the fixes I made at the link I provided above to your current MSMW theme you won't experience any negative issues as MacMyDay has independently verified. The widget overwrite glitch only occurs if you load and enable a backstop theme then switch back to the previous MSMW theme.

    Posted 7 months ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme