PHP 7

Posted in: Newspaper
Post count: 128

Hi team,
Is the newspaper theme now compatible with PHP7? According to PHP Compatibility Checker, WP Bakery Visual Composer is incompatible (I have updated to latest version in theme files).
Please advise.
Thanks

Post count: 22421

Hello,

Please update to the latest version of the theme and visual composer: https://forum.tagdiv.com/how-to-update-the-theme-2/ and https://forum.tagdiv.com/how-to-update-visual-composer-plugin/
Then make sure you install PHP version 7.0
The theme is now compatible with php 7.0
Do not install 7.1 as it is not yet compatible.

Thank you!

Post count: 128

Hi,
Is there someway I can check that the theme updated correctly? After updating I ran the PHP compatibility checker and get incompatibility errors for visual composer and slider revolution. Here’s the notes for Visual Composer:
FILE: /nas/content/live/travel2next/wp-content/plugins/js_composer/include/templates/editors/partials/backend-shortcodes-templates.tpl.php
————————————————————————————————————————————————–
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
————————————————————————————————————————————————–
44 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%= type %>”>
45 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%= heading %></div>
47 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%= form_element %>
————————————————————————————————————————————————–

FILE: /nas/content/live/travel2next/wp-content/plugins/js_composer/include/templates/editors/popups/shared-templates/category.tpl.php
————————————————————————————————————————————————————-
FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
————————————————————————————————————————————————————-
134 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- post_id %>”
135 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- title %>”
141 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- title %></button>
149 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- post_id %>"]” titl…
160 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- id %>”>
162 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- thumbnailUrl %>” alt=””…
165 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- previewUrl %>” data-tit…
167 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <% if (!downloaded) { %>
171 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <% } else if (downloaded &&…
175 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <% } %>
180 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%- title %></span>
182 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%= status %>
————————————————————————————————————————————————————-

FILE: /nas/content/live/travel2next/wp-content/plugins/js_composer/include/templates/teaser.html.php
————————————————————————————————————————————————————
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
————————————————————————————————————————————————————
84 | WARNING | Possible use of ASP style opening tags detected. ASP style opening tags have been removed in PHP 7.0. Found: <%= id %>” src=”<%= url %>”…
————————————————————————————————————————————————————

FILE: /nas/content/live/travel2next/wp-content/plugins/js_composer/js_composer.php
———————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
———————————————————————————-
220 | ERROR | Visibility for magic method __sleep must be public. Found: private
———————————————————————————-

Slider revolution:
FILE: /nas/content/live/travel2next/wp-content/plugins/revslider/includes/slider.class.php
————————————————————————————————————————–
FOUND 1 ERROR AFFECTING 1 LINE
————————————————————————————————————————–
2231 | ERROR | ‘clone’ is a reserved keyword introduced in PHP version 5.0 and cannot be invoked as a function (T_CLONE)
————————————————————————————————————————–

FILE: /nas/content/live/travel2next/wp-content/plugins/revslider/includes/output.class.php
————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
————————————————————————————————————————-
436 | ERROR | ‘clone’ is a reserved keyword introduced in PHP version 5.0 and cannot be invoked as a function (T_CLONE)
————————————————————————————————————————-

Post count: 22421

Hello,

These are warnings that in most cases could be ignored. As long as there are no errors, the site should be fine. You are testing with a php checker so they could not be errors on your site at all. This will detect all of the code and these could not show up anywhere. Nonetheless I will add this to our list for future updates and have a look. Unfortunately since the warning originate from the visual composer and revolution slider plugins, there will be little to be done from the theme’s side. We are not allowed to edit the plugin code as it will break our license agreement. Please make sure both plugins are up to date using the latest version of the theme (latest version of the plugins can be found in the latest version of the theme’s package)
Visual composer as well as revolution slider are working on adding compatibility for PHP 7 as can be seen here: https://www.screencast.com/t/RkeIneluV but there could be a few such warnings that were missed and will be updated in future versions. Warnings usually do not break the functionality.

Thank you!

Post count: 128

Hi Bogdan,

Since updating to PHP7, Google Webmaster Tools is showing critical errors in AMP (9 pages with critical errors) and Mobile Useability (192 pages with issues). We’re using the standard mobile theme (not TagDiv mobile theme).

My server company WP Engine says it’s a conflict with a plugin. We have narrowed it down and think it’s a conflict with the theme or visual composer or revolution slider.

Can you help please?! I’m going round in circles.

Post count: 128

Currently installed:
Theme version 7.7
PHP version 7.0.15-0ubuntu0.16.04.2
WP version 4.7.2
Slider revolution 5.2.4.1
Visual Composer 5.0.1

Post count: 22421

Hello,

In order to figure out which plugin causes the error, simply remove all of them and clear all caching. Then run some tests. Visual composer and revolution slider are known for not having full php 7 compatibility but they are working on it as they have added compatibility in each of the previous versions, but unfortunately it is not a simple thing to make and you cannot add it all at once as you cannot know all of the situations that can show up and this is done over multiple updates. From the theme side, we already implemented full php 7.0 compatibility. I cannot provide any solution for the plugins however as we are not allowed to modify the plugins code as it breaks our license agreement.

Thank you!

Post count: 128

Hello Bogdan,

When testing with PHP checker, Newspaper is showing this:

FILE: /nas/content/live/travel2next/wp-content/themes/Newspaper/includes/wp_booster/external/less.php-master/lib/Less/SourceMap/Base64VLQ.php
———————————————————————————————————————————————
FOUND 3 ERRORS AFFECTING 1 LINE
———————————————————————————————————————————————
156 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
156 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
156 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
———————————————————————————————————————————————

FILE: /nas/content/live/travel2next/wp-content/themes/Newspaper/includes/wp_booster/external/less.php-master/lib/Less/Parser.php
——————————————————————————————————————————–
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
——————————————————————————————————————————–
470 | WARNING | INI directive ‘mbstring.internal_encoding’ is deprecated since PHP 5.6.
471 | WARNING | INI directive ‘mbstring.internal_encoding’ is deprecated since PHP 5.6.
478 | WARNING | INI directive ‘mbstring.internal_encoding’ is deprecated since PHP 5.6.
——————————————————————————————————————————–

FILE: /nas/content/live/travel2next/wp-content/themes/Newspaper/includes/wp_booster/td_translate.php
—————————————————————————————————————————————
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
—————————————————————————————————————————————
263 | WARNING | Function name “__td” is discouraged; PHP has reserved all method names with a double underscore prefix for future use
—————————————————————————————————————————————

Post count: 22421

Ok. We will look into this and make the proper adjustment in a future version of the theme. If these errors prevent the proper functionality of the theme please revert to a previous version of php 7.0. Try 7.014 for instance. These checkers sometimes provide false errors as well. Please provide the checker you are using in order to get these errors so we can test for ourselves.
Thank you!

Post count: 128
Post count: 22421

OK,

I added the issues on our list for future updates and the development team will look into these issues and make the proper adjustments for future updates.
The first 2 errors these ones: https://www.screencast.com/t/bQ3Gfse116https://www.screencast.com/t/QgCn7vqw0Ml are our less compiler that is not used in the deploy version (the release version) It is only used in development so it will not affect any part of your site at all. These errors can be ignored as they are not part of the theme. They are present in the theme code but not used.
The only issue is the name of the function at the bottom of the second screenshot. That is the only warning and we will fix that in future updates.

Thank you!

Post count: 1

This error fixed? Bogdan B.?

Post count: 22421

Hello,

Sorry but we did not test wpengine’s checker yet. we will improve the php compatibility further in the next theme version as we plan on implementing full php 7.1 compatibility so then there should be no more php errors. We hope we can provide it in the next update though. I cannot promise anything yet.

Thank you!

Viewing 13 posts - 1 through 13 (of 13 total)
The forum ‘Newspaper’ is closed to new topics and replies.