Shortcode embed error
-
I used this plugin on a development site and it worked really well.
But on my live site some php tags have appeared on the front end where the shortcode has been added.
The page source code looks like this:<?php<section class="widget"><section id="eventhere" class="wfea eaw-block "><?php <div class="eaw-ulx"> <div class="eaw-li__wrap">
The events are displaying but the layout of the page is broken.
Unfortunately we do have a different server set up on dev and live which is unavoidable.
Can anyone point me in the right direction to try and fix this?
Many thanks for any help!
-
This indeed strange and not something I have heard of before. It is almost as if the webserver is deciding that the template files are not PHP files.
It would be useful, if you don’t mind, putting a link to a test page /post that is not working as inspecting that may give some clues. Please remember any link that is put in a reply will be public ( and the moderators will not then remove them ). You can add links in the initial topic which wont get index publicly.
I’ll do some googling too to see if anything helps.
OK a bit of a wild guess but could be permissions, or could be a security system – do you have any security plugins on live?
It could be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.
You can do this without impacting other users see below.
If you can install plugins, install and activate “Health Check”: https://www.ads-software.com/plugins/health-check/
It will add some additional features under the menu item under Tools > Site Health.
On its troubleshooting tab, you can Enable Troubleshooting Mode. This will disable all plugins, switch to a standard WordPress theme (if available), allow you to turn your plugins on and off and switch between themes, without affecting normal visitors to your site. This allows you to test for various compatibility issues.
There’s a more detailed description about how to use the Health Check plugin and its Troubleshooting Mode at https://make.www.ads-software.com/support/handbook/appendix/troubleshooting-using-the-health-check/-
This reply was modified 2 years, 5 months ago by
Alan Fuller.
Thank you so much for your replies!
I am trying to work this out with the hosting company first of all, as I suspect it might be a difference in the hosting environment, so far he’s upgraded the php version, but it hasn’t resolved the issue.
I would rather not post a link to the site publicly, is there any way I can send you a link via dm?
Thanks!If you go to tools>site health
And go to info and click the copy and then redact anything that relates to your domain ( there is nothing of security concern in the data )
And paste here it is likely to give as much info as could be useful.
If you want to send me the url you can use the contact form on https://fullworksplugins.com
Thanks Alan, here’s the info from Site Health:
### wp-core ### version: 6.0.2 site_language: en_GB user_language: en_GB timezone: Europe/London permalink: /%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: closed environment_type: production user_count: 10 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /var/www/clients/client1/web46/web wordpress_size: loading... uploads_path: /var/www/clients/client1/web46/web/wp-content/uploads uploads_size: loading... themes_path: /var/www/clients/client1/web46/web/wp-content/themes themes_size: loading... plugins_path: /var/www/clients/client1/web46/web/wp-content/plugins plugins_size: loading... database_size: loading... total_size: loading... ### wp-active-theme ### name: Twenty Twenty XXX (twentytwenty-XXX) version: 1.0 author: XXX author_website: (undefined) parent_theme: Twenty Twenty (twentytwenty) theme_features: core-block-patterns, widgets-block-editor, editor-style, automatic-feed-links, custom-background, post-thumbnails, custom-logo, title-tag, html5, align-wide, responsive-embeds, customize-selective-refresh-widgets, editor-color-palette, editor-font-sizes, editor-styles, widgets, menus theme_path: /var/www/clients/client1/web46/web/wp-content/themes/twentytwenty-XXX ### wp-parent-theme ### name: Twenty Twenty (twentytwenty) version: 2.0 author: the WordPress team author_website: https://en-gb.www.ads-software.com/ theme_path: /var/www/clients/client1/web46/web/wp-content/themes/twentytwenty ### wp-themes-inactive (1) ### Twenty Twenty-Two: version: 1.2, author: the WordPress team ### wp-mu-plugins (1) ### installatron_hide_status_test.php: author: (undefined), version: (undefined) ### wp-plugins-active (29) ### AddToAny Share Buttons: version: 1.8.5, author: AddToAny Admin Options Pages: version: 0.9.7, author: Johannes van Poelgeest Advanced Custom Fields PRO: version: 6.0.2, author: WP Engine Advanced Editor Tools (previously TinyMCE Advanced): version: 5.6.0, author: Automattic Advanced Post Types Order: version: 4.5, author: Nsp Code (latest version: 4.5.7) CC Child Pages: version: 1.40, author: Caterham Computing Classic Editor: version: 1.6.2, author: WordPress Contributors Classic Widgets: version: 0.3, author: WordPress Contributors Custom Post Type UI: version: 1.13.1, author: WebDevStudios Custom Post Type Widgets: version: 1.5.1, author: thingsym Custom Sidebars: version: 3.35, author: WebFactory Ltd Custom Twitter Feeds: version: 2.0.3, author: Smash Balloon Display Eventbrite Events: version: 5.0.3, author: Fullworks Google Analytics Dashboard for WP (GADWP): version: 7.8.2, author: ExactMetrics (latest version: 7.9.0) Html5 Video Player: version: 2.5.7, author: bPlugins LLC (latest version: 2.5.8) MC4WP: Mailchimp for WordPress: version: 4.8.10, author: ibericode Ninja Forms: version: 3.6.14, author: Saturday Drive Ninja Forms - Conditional Logic: version: 3.1, author: The WP Ninjas Ninja Forms - PayPal Express: version: 3.0.15, author: The WP Ninjas (latest version: 3.1.2) XXX Links: version: 1.0, author: Pau Iglesias XXX Media Library: version: 1.0, author: Pau Iglesias Recent Posts Widget With Thumbnails: version: 7.1.1, author: Kybernetik Services Redirection: version: 5.3.4, author: John Godley Regenerate Thumbnails: version: 3.1.5, author: Alex Mills (Viper007Bond) Simple Lightbox: version: 2.9.1, author: Archetyped (latest version: 2.9.2) UpdraftPlus - Backup/Restore: version: 1.22.22, author: UpdraftPlus.Com, DavidAnderson (latest version: 1.22.23) WPFront Scroll Top: version: 2.0.7.08086, author: Syam Mohan WP Mail SMTP: version: 3.5.2, author: WPForms Yoast SEO: version: 19.6.1, author: Team Yoast (latest version: 19.7.1) ### wp-plugins-inactive (9) ### Akismet Anti-Spam: version: 5.0, author: Automattic (latest version: 5.0.1) Post Types Order: version: 1.9.9.1, author: Nsp Code Server Info: version: 2.5.3, author: Usman Ali Qureshi Vimeography: version: 2.3.1, author: Dave Kiss WordPress Importer: version: 0.7, author: wordpressdotorg (latest version: 0.8) WP All Export Pro: version: 1.7.6, author: Soflyy WP All Import - ACF Add-On: version: 3.2.5, author: Soflyy WP All Import Pro: version: 4.6.0, author: Soflyy WP Maintenance Mode & Coming Soon: version: 2.5.1, author: Themeisle (latest version: 2.5.3) ### wp-media ### image_editor: WP_Image_Editor_Imagick imagick_module_version: 1687 imagemagick_version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 https://www.imagemagick.org imagick_version: 3.4.4 file_uploads: File uploads is turned off post_max_size: 800M upload_max_filesize: 200M max_effective_size: 200 MB max_file_uploads: 20 imagick_limits: imagick::RESOURCETYPE_AREA: 122 MB imagick::RESOURCETYPE_DISK: 1073741824 imagick::RESOURCETYPE_FILE: 6144 imagick::RESOURCETYPE_MAP: 512 MB imagick::RESOURCETYPE_MEMORY: 256 MB imagick::RESOURCETYPE_THREAD: 6 imagemagick_file_formats: 3FR, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DJVU, DNG, DOT, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GROUP4, GV, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WMF, WMV, WMZ, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV gd_version: 2.2.5 gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM ghostscript_version: 9.26 ### wp-server ### server_architecture: Linux 4.15.0-163-generic x86_64 httpd_software: Apache php_version: 7.3.12-1+ubuntu18.04.1+deb.sury.org+1 64bit php_sapi: cgi-fcgi max_input_variables: 1000 time_limit: 30 memory_limit: 256M max_input_time: 60 upload_max_filesize: 200M php_post_max_size: 800M curl_version: 7.58.0 OpenSSL/1.1.1d suhosin: false imagick_availability: true pretty_permalinks: true htaccess_extra_rules: false ### wp-database ### extension: mysqli server_version: 10.1.48-MariaDB-0ubuntu0.18.04.1 client_version: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ max_allowed_packet: 16777216 max_connections: 151 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /var/www/clients/client1/web46/web/wp-content WP_PLUGIN_DIR: /var/www/clients/client1/web46/web/wp-content/plugins WP_MEMORY_LIMIT: 128M WP_MAX_MEMORY_LIMIT: 256M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### wp_mail_smtp ### version: 3.5.2 license_key_type: lite debug: No debug notices found.
Thank you for sending the URL that you want to keep private.
I visited it and can see nothing wrong.
That would indicate either your host fixed something or that something got cached and you have not yet cleared your cache.
Can you try this please
Edit the plugins/widget-for-eventbrite-api/templates_free/loops/loops_widget.php
and change
if ( $data->utilities->get_element( 'widgetwrap', $data->args ) ) { ?><section class="widget"><?php }
to
if ( $data->utilities->get_element( 'widgetwrap', $data->args ) ) {?> <section class="widget"> <?php }
i.e. put the html onto a separate line than the html
and send me a screenshot ( you can share screen sots by link here ) of teh source generated for the section.
It is a bit of a wild guess but it may be something with the way your webserver is interpreting php tags
Thanks again for your continued support with this!
I have tried updating that code – but I found it on the file
plugins/widget-for-eventbrite-api/templates_free/common_layout_widget.php
is this ok?Unfortunately, it hasn’t resolved it.
I also tried adjusting the php tags around the closing section tag, but this hasn’t helped.I am still in communication with the host, it’s taking a while for them to get back to me!
My bad – I pointed you at the wrong file – but you found the right one.
Have you tried, as mentioned earlier, using the health check plugin to test with default theme and no other plugins active ( without impacting user ) just to be sure it is not some strange plugin conflict.
I have tried to reproduce myself and have not been able to.
As the system does use templates is there any chance that some one edited a template ( incorrectly ), it would be common_layout_widget.php. Are there any directories either in the theme or child theme folders called widget-for-eventbrite-api or in wp-content/widget-for-eventbrite-api ?
There definitely aren’t any widget-for-eventbrite template files in the child or parent theme.
I haven’t tried the health check plugin yet. I’ll have time to do that tomorrow morning and I’ll let you know how I get on.
I have now tried the health check plugin.
I disabled all themes and plugins except the eventbrite one, and I still have the same problem.I don’t supose you can think of any other possibilities?
thanks!It is very strange indeed.
I don’t think you shared the exact shortcode you were using, just incase it is done strange edgecase bug. I don’t think so, but need to eliminate it.
Here’s the shortcode:
[wfea layout="widget" limit="10" thumb_align="eaw-alignleft" newtab="true" tickets="true"]
Thanks again!
Well that ruled out the shortcode, at least on my test.
I am just building a test site with your PHP version 7.3.12 just incase.
Next step I think
make a copy of plugins/widget-for-eventbrite-api/templates_free/common_layout_widget.php e.g. plugins/widget-for-eventbrite-api/templates_free/common_layout_widget.safe
and delete every thing in there and then just add
<div class="test">TEST TEST TEST</div>
That is all then we should get only output TEST TEST TEST
-
This reply was modified 2 years, 5 months ago by
- The topic ‘Shortcode embed error’ is closed to new replies.