Home › Toolset Professional Support › [Resolved] CONFLICT WITH PHP7 and AVADA THEME
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Tagged: Content Templates, Views plugin
Related documentation:
This topic contains 20 replies, has 2 voices.
Last updated by Nigel 6 years, 11 months ago.
Assisted by: Nigel.
Hello,
We are upgrading our site to PHP7 and we have a conflict. Example page: hidden link
After debugging the issue,the conflict is between WP-TYPES Views ( Content Templates) and PHP7 within a content template.
The reason the page is looking like that is because the issue is that we are unable to use a shortcode within the wp-types conditional statements.
Example below:
[wpv-conditional if="( $(wpcf-gear-review-first-section-title) ne '' )"]
[fusion_title margin_top="0" margin_bottom="0" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="h2" id="" size="2" content_align="center" style_type="none" sep_color=""]
<span>Testing 1 2 3 </span>
[/fusion_title]
[/wpv-conditional]
What the above should do is only display the title when the first-section-title custom field is empty. However, it is not working because our template is using alot of conditionals. Template attached.
When we test the same code on a PHP5.6 install, it works fine just like it is on the live site. Example: hidden link
Your help is appreciated
Thanks
Amit
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Amit
I looked at the page in question—yes, the template is lengthy and uses a lot of conditionals.
I tried to see if you have a debug.log but I was unable to get FTP access using the credentials you provided.
Could you please check the logs and check for any messages relating to this page?
If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:
define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
That will create a debug.log file in your wp-content directory which you can examine in any text editor. Re-visit the page and then inspect the log. If you don't find the debug.log file it means it didn't generate any warnings or errors.
Hello,
Please try port: 2222
By the way, this ticket is private correct? Can you change to private otherwise.
Thanks
Amit
Added the debug entries in wp-config as well. Thanks
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Amit
I observed the problem on your site and made a copy to test locally.
Although the fusion builder shortcodes inside a wpv-conditional shortcode are being printed to the screen rather than parsed on your site when using PHP 7, I wasn't able to reproduce the same on a simple Avada test site I have installed locally.
There appears to be an exception that is particular to your site.
I am escalating this thread so that it can be investigated further, and I'll update you here when I have something to report.
Thanks for your patience.
Can you tell me the details of your Test Install? Does it have the latest Avada release(5.3) + PHP7
Hello,
I've tested the following:
- Installed a fresh wordpress install on PHP7
- Installed a fresh Avada 5.3 install
- Latest WordPress core 4.9
- Installed Latest WP-Types
- Installed Latest WP-Views
Recreated my custom post type and just used the simple conditional within my content template provided earlier and still getting the same problem.
Getting the same issue. Let me know how I can provide you the new install details so you can see a more simple setup mentioned above.
Thanks
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Amit
I've been working with a colleague in second tier trying to isolate the problem and haven't been able to so far, though we are still working on it.
If you have a simpler version where the same problem can be seen then that might help.
I'll mark you next reply as private again to get site credentials from you.
I mean this very respectfully but is there a way to expedite this issue? It seems so basic that the #1 popular theme not working with WP-Types should be on a high priority fix list?
It is really hurting our client's deadline and we need to deploy the latest changes for the client.
I was expecting a faster turnaround for a paid software... Can you help out on this please?
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Amit
Sorry we haven't been able to resolve this yet.
Bear in mind that this is an exception that occurs on your site, we have been unable to reproduce it on test sites, and it is not something that is affecting the use of Avada with Types generally.
I haven't been able to get a copy of your second site because the admin pages have an extra layer of security and I don't have credentials to get past the authorisation form.
Let me mark the reply as private again to see if you can update the site credentials so I can pass a copy of this on to my colleague to see if it helps expedite the solution.
I sent the updated credentials. This tells me that you haven't looked at the issue since I last sent the issue. 🙁
Why do you think this is an "exception" ? Seems pretty basic what I'm trying to do on a pretty basic setup.
I've installed the latest wordpress 4.9 , Base installation of Avada on PHP7 ( which is the recommended version for Avada ) and the latest release of Wp-types and Wp-views
The shortcodes don't work within a conditional within my Custom post type .
If there is something that is incorrectly setup, please let me know.
Languages: English (English ) Spanish (Español )
Timezone: Europe/London (GMT+00:00)
Hi Amit
I tried before and they didn't work, I just tried another 6 times and they still don't work, I'm not sure what "a few times" means.
My colleague has the original site for testing, but you could use All in One WP Migration to create a backup archive of the second site (I know that Duplicator doesn't work on WP Engine), and provide a link in the next reply to the archive (I'll enable private reply so that you can share a dropbox link or similar).
By "exception" I mean that it is a problem which is not generally reproducible, it appears to happen only on your particular site.
To demonstrate Avada working with Toolset on PHP 7 I set up an online server where you can see it in action.
I created a custom post type "Things" and made a template for single Thing posts using Avada. I stopped using the Avada page builder so that I could then edit the Content Template directly and wrap various sections of the fusion builder shortcodes with conditional shortcodes, in much the same way you have on your site.
I nested conditional shortcodes 3 levels deep and they worked without issue. (I am using simple conditions but the conditions themselves do not appear to be the problem, on my copy of your site I replaced all of the conditions with similar simple conditions and it didn't fix the problem).
You can see the results here: hidden link
That is generated by the following markup in the content editor:
[fusion_builder_container hundred_percent="no" hundred_percent_height="no" hundred_percent_height_scroll="no" hundred_percent_height_center_content="yes" equal_height_columns="no" menu_anchor="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="center center" background_repeat="no-repeat" fade="no" background_parallax="none" enable_mobile="no" parallax_speed="0.3" video_mp4="" video_webm="" video_ogv="" video_url="" video_aspect_ratio="16:9" video_loop="yes" video_mute="yes" video_preview_image="" border_size="" border_color="" border_style="solid" margin_top="" margin_bottom="" padding_top="" padding_right="" padding_bottom="" padding_left=""] [fusion_builder_row] [fusion_builder_column type="1_1" layout="1_1" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="" dimension_margin="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"] [fusion_text hide_pop_tinymce=""]So here is some text that is not inside any conditional to get us started.[/fusion_text] [wpv-conditional if="( '1' eq '1' )"] [fusion_text hide_pop_tinymce=""]Here is some text inside a Text Block module that is inside a conditional shortcode[/fusion_text] [wpv-conditional if="( '2' eq '2' )"] [fusion_text hide_pop_tinymce=""]Here is some text in a text module which is inside a nested conditional shortcode[/fusion_text] [wpv-conditional if="('3' eq '3')"][fusion_text hide_pop_tinymce=""]And here is another text block in a text module, this time inside a double-nested conditional (i.e. 3 conditionals)[/fusion_text] [/wpv-conditional] [/wpv-conditional] [fusion_text hide_pop_tinymce=""]Finally, here is another text block, this time inside the main conditional only.[/fusion_text] [fusion_text hide_pop_tinymce=""]<p>Not forgetting, of course, the post content.</p>[wpv-post-body view_template="None"][/fusion_text] [/wpv-conditional] [/fusion_builder_column] [/fusion_builder_row] [/fusion_builder_container]
I used the same site credentials as you provided in your last private message so that you can check the set up yourself if you wish.
Exceptions like this are typically harder to pin down than general conflicts and bugs, but, in any case I've updated the internal ticket asking my colleague to prioritise finding a solution which he will hopefully be able to do soon.
If you make a copy of the second site available I will add that to the ticket.
Hello,
I've created a simple Avada Container ( 1/6 and 2/3 and 1/6 column sections ) with a simple title in between. Please try this simple test and and let me know what you are seeing and see if you're able to reproduce the same issue:
TEST #1 - Simple title within the [fusion_title] shortcode
[wpv-conditional if="( '1' eq '1' )"] [fusion_builder_container hundred_percent="no" hundred_percent_height="no" hundred_percent_height_scroll="no" hundred_percent_height_center_content="yes" equal_height_columns="no" menu_anchor="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="center center" background_repeat="no-repeat" fade="no" background_parallax="none" enable_mobile="no" parallax_speed="0.3" video_mp4="" video_webm="" video_ogv="" video_url="" video_aspect_ratio="16:9" video_loop="yes" video_mute="yes" video_preview_image="" border_size="" border_color="" border_style="solid" margin_top="" margin_bottom="" padding_top="" padding_right="" padding_bottom="" padding_left=""][fusion_builder_row][fusion_builder_column type="1_6" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="undefined" dimension_margin="undefined" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][/fusion_builder_column][fusion_builder_column type="2_3" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="undefined" dimension_margin="undefined" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][fusion_title hide_pop_tinymce="" margin_top="" margin_bottom="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" size="1" content_align="left" style_type="default" sep_color=""][types field='gear-review-first-section-title'][/types][/fusion_title][/fusion_builder_column][fusion_builder_column type="1_6" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="undefined" dimension_margin="undefined" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container] [/wpv-conditional]
TEST#2 - Same everything but using a types field as the fusion_title instead:
[wpv-conditional if="( '1' eq '1' )"] [fusion_builder_container hundred_percent="no" hundred_percent_height="no" hundred_percent_height_scroll="no" hundred_percent_height_center_content="yes" equal_height_columns="no" menu_anchor="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="center center" background_repeat="no-repeat" fade="no" background_parallax="none" enable_mobile="no" parallax_speed="0.3" video_mp4="" video_webm="" video_ogv="" video_url="" video_aspect_ratio="16:9" video_loop="yes" video_mute="yes" video_preview_image="" border_size="" border_color="" border_style="solid" margin_top="" margin_bottom="" padding_top="" padding_right="" padding_bottom="" padding_left=""][fusion_builder_row][fusion_builder_column type="1_6" layout="1_6" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="" dimension_margin="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][/fusion_builder_column][fusion_builder_column type="2_3" layout="2_3" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="" dimension_margin="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][fusion_title hide_pop_tinymce="" margin_top="" margin_bottom="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" size="1" content_align="left" style_type="default" sep_color=""][types field='gear-review-first-section-title'][/types][/fusion_title][/fusion_builder_column][fusion_builder_column type="1_6" layout="1_6" spacing="" center_content="no" link="" target="_self" min_height="" hide_on_mobile="small-visibility,medium-visibility,large-visibility" class="" id="" background_color="" background_image="" background_position="left top" background_repeat="no-repeat" hover_type="none" border_size="0" border_color="" border_style="solid" border_position="all" padding="" dimension_margin="" animation_type="" animation_direction="left" animation_speed="0.3" animation_offset="" last="no"][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container] [/wpv-conditional]
Please let me know if you're able to reproduce it.