pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 265 forks source link

Third party shortcodes failing to display consistently when embedded via code syntax field #7317

Closed Pezzab closed 1 week ago

Pezzab commented 1 week ago

Description

I'm having multiple problems with embedded shortcodes for third party plugins and in multiple contexts. Either the shortcode fails to render at all (ie displays shortcode in browser) or I'm getting partial rendering of shortcode (eg form elements not displaying)

Version

3.2.2

Testing Instructions

1: install WordPress with default theme 2: install Pods 3: install WP Contact Forms, create basic form and shortcode 4: create pod extending posts with a Code Syntax field, enable shortcode embeds 5: create post and add form shortcode to the pods field under "More fields" 6: add pods block to the post and select pod name then the name of the code syntax embed field 7: for comparison also add native shortcode block and add the wpforms shortcode there too 8: publish post

Screenshots / Screencast

In this screencap the first example of a wp form is embedded via the Pods field block, the second is embedded using WP native shortcode block, note the javascript warning:

image

Difficult to screengrab the full edit screen:

image

The field that is embedded with the Pods field block

image

Possible Workaround

No work around found - though I have found examples of shortcode embedded in pods fields rendering in some contexts but not others on the same site.

Site Health Information

`
### wp-core ###

version: 6.5.5
site_language: en_US
user_language: en_US
timezone: +00:00
permalink: /%postname%/
https_status: false
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: open
environment_type: local
user_count: 1
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: C:\Users\username\Local Sites\testing\app\public
wordpress_size: 54.68 MB (57337650 bytes)
uploads_path: C:\Users\username\Local Sites\testing\app\public/wp-content/uploads
uploads_size: 5.62 MB (5890766 bytes)
themes_path: C:\Users\username\Local Sites\testing\app\public/wp-content/themes
themes_size: 12.21 MB (12805431 bytes)
plugins_path: C:\Users\username\Local Sites\testing\app\public/wp-content/plugins
plugins_size: 38.55 MB (40426976 bytes)
database_size: 3.25 MB (3407872 bytes)
total_size: 114.32 MB (119868695 bytes)

### wp-active-theme ###

name: Twenty Twenty-Two (twentytwentytwo)
version: 1.6 (latest version: 1.7)
author: the WordPress team
author_website: https://wordpress.org/
parent_theme: none
theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates, wp-block-styles, editor-style
theme_path: C:\Users\usernamel\Local Sites\testing\app\public/wp-content/themes/twentytwentytwo
auto_update: Disabled

### wp-plugins-active (3) ###

Contact Form 7: version: 5.9.6, author: Takayuki Miyoshi, Auto-updates disabled
Pods - Custom Content Types and Fields: version: 3.2.2, author: Pods Framework Team, Auto-updates disabled
WPForms Lite: version: 1.8.9.2, author: WPForms, Auto-updates disabled

### wp-plugins-inactive (1) ###

Create Block Theme: version: 1.13.8, author: WordPress.org (latest version: 2.2.0), Auto-updates disabled

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1808
imagemagick_version: ImageMagick 7.1.0-18 Q16 x64 2021-12-14 https://imagemagick.org
imagick_version: 3.7.0
file_uploads: 1
post_max_size: 1000M
upload_max_filesize: 300M
max_effective_size: 300 MB
max_file_uploads: 20
imagick_limits: 
    imagick::RESOURCETYPE_AREA: 16 GB
    imagick::RESOURCETYPE_DISK: 9.2233720368548E+18
    imagick::RESOURCETYPE_FILE: 1536
    imagick::RESOURCETYPE_MAP: 16 GB
    imagick::RESOURCETYPE_MEMORY: 8 GB
    imagick::RESOURCETYPE_THREAD: 1
    imagick::RESOURCETYPE_TIME: 9.2233720368548E+18
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, APNG, ART, ARW, ASHLAR, AVI, AVIF, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CLIPBOARD, CMYK, CMYKA, CR2, CR3, CRW, CUBE, CUR, CUT, DATA, DCM, DCR, DCRAW, DCX, DDS, DFONT, DJVU, DNG, DOT, DPS, DPX, DXT1, DXT5, EMF, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, EXR, FARBFELD, FAX, FF, FILE, FITS, FL32, FLIF, FLV, FPX, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, GV, HALD, HDR, HEIC, HEIF, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, J2C, J2K, JBG, JBIG, JNG, JNX, JP2, JPC, JPE, JPEG, JPG, JPM, JPS, JPT, JSON, JXL, K25, KDC, KERNEL, LABEL, M2V, M4V, MAC, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MSVG, MTV, MVG, NEF, NRW, NULL, ORA, ORF, OTB, OTF, PAL, PALM, PAM, PANGO, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PHM, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, POCKETMOD, PPM, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGB565, RGBA, RGBO, RGF, RLA, RLE, RMF, RSVG, RW2, SCR, SCREENSHOT, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, SVG, SVGZ, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TM2, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBM, WEBP, WMF, WMV, WPG, X3F, XBM, XC, XCF, XPM, XPS, XV, YAML, YCbCr, YCbCrA, YUV
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM
ghostscript_version: not available

### wp-server ###

server_architecture: Windows NT 10.0 AMD64
httpd_software: nginx/1.16.0
php_version: 8.1.23 64bit
php_sapi: cgi-fcgi
max_input_variables: 4000
time_limit: 1200
memory_limit: 256M
max_input_time: 600
upload_max_filesize: 300M
php_post_max_size: 1000M
curl_version: 7.77.0 OpenSSL/1.1.1t
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: false
current: 2024-06-25T11:17:31+00:00
utc-time: Tuesday, 25-Jun-24 11:17:31 UTC
server-time: 2024-06-25T11:17:30+00:00

### wp-database ###

extension: mysqli
server_version: 8.0.16
client_version: mysqlnd 8.1.23
max_allowed_packet: 16777216
max_connections: 151

### wp-constants ###

WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: C:\Users\username\Local Sites\testing\app\public/wp-content
WP_PLUGIN_DIR: C:\Users\username\Local Sites\testing\app\public/wp-content/plugins
WP_MEMORY_LIMIT: 40M
WP_MAX_MEMORY_LIMIT: 256M
WP_DEBUG: true
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: local
WP_DEVELOPMENT_MODE: theme
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable

### pods ###

pods-version: 3.2.2
pods-first-version: 3.2.2
pods-last-version: 3.2.2
pods-server-software: nginx/1.16.0
pods-user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
pods-session-save-path: undefined
pods-session-save-path-exists: No
pods-session-save-path-writable: No
pods-session-max-lifetime: 1440
pods-opcode-cache-apc: No
pods-opcode-cache-memcached: No
pods-opcode-cache-opcache: Yes
pods-opcode-cache-redis: No
pods-object-cache-apc: No
pods-object-cache-apcu: No
pods-object-cache-memcache: No
pods-object-cache-memcached: No
pods-object-cache-redis: No
pods-memory-current-usage: 7.192M / 40M
pods-memory-current-usage-real: 8.000M
pods-network-wide: No
pods-install-location: C:\Users\username\Local Sites\testing\app\public\wp-content\plugins\pods/
pods-developer: No
pods-tableless-mode: No
pods-relationship-table-enabled: Yes
pods-relationship-table-status: 0
pods-light-mode: No
pods-strict: No
pods-allow-deprecated: Yes
pods-api-cache: Yes
pods-shortcode-allow-evaluate-tags: No
pods-can-use-sessions: No
pods-settings-types_only: Enable [types_only=0]
pods-settings-watch_changed_fields: Disable [watch_changed_fields=0]
pods-settings-metadata_integration: Disable [metadata_integration=0]
pods-settings-metadata_override_get: Disable [metadata_override_get=0]
pods-settings-register_meta_integration: Disable [register_meta_integration=0]
pods-settings-media_modal_fields: Enable [media_modal_fields=0]
pods-settings-session_auto_start: Disable [session_auto_start=0]
pods-settings-dynamic_features_allow: Enable [dynamic_features_allow=1]
pods-settings-dynamic_features_enabled: Display and Form [dynamic_features_enabled=display,form]
pods-settings-show_access_restricted_messages: Disable [show_access_restricted_messages=0]
pods-settings-show_access_admin_notices: Enable [show_access_admin_notices=1]
pods-settings-dynamic_features_allow_sql_clauses: Disable [dynamic_features_allow_sql_clauses=0]
pods-settings-display_callbacks: Customized [display_callbacks=customized]
pods-settings-display_callbacks_allowed: esc_attr,esc_html

### wpforms ###

version: 1.8.9.2
lite: June 25, 2024 at 10:48 am
upload_dir: Writable
total_forms: 1
total_submissions: undefined

`

Pods Package

{
    "@meta": {
        "version": "3.2.2",
        "build": 1719314423
    },
    "settings": {
        "types_only": "0",
        "watch_changed_fields": "0",
        "metadata_integration": "0",
        "metadata_override_get": "0",
        "register_meta_integration": "0",
        "media_modal_fields": "0",
        "session_auto_start": "0",
        "dynamic_features_allow": "1",
        "dynamic_features_enabled": [
            "display",
            "form"
        ],
        "show_access_restricted_messages": "0",
        "show_access_admin_notices": "1",
        "dynamic_features_allow_sql_clauses": "0",
        "display_callbacks": "customized",
        "display_callbacks_allowed": "esc_attr,esc_html",
        "wisdom_opt_out": "1",
        "active_components": [
            "migrate-packages",
            "templates"
        ]
    },
    "pods": [
        {
            "name": "post",
            "id": 23,
            "label": "Posts",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "object": "post",
            "_migrated_28": "1",
            "dynamic_features_allow": "inherit",
            "restrict_dynamic_features": "0",
            "restricted_dynamic_features": [
                "form"
            ],
            "restricted_dynamic_features_forms": [
                "edit"
            ],
            "show_access_restricted_messages": "inherit",
            "show_access_admin_notices": "inherit",
            "pfat_enable": "0",
            "pfat_single": "0",
            "pfat_filter_single": "the_content",
            "pfat_archive": "0",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "groups": [
                {
                    "name": "more_fields",
                    "id": 24,
                    "label": "More Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "test_code_syntax",
                            "id": 25,
                            "label": "test code syntax",
                            "description": "",
                            "weight": 0,
                            "type": "code",
                            "code_max_length": "-1",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "roles_allowed": "administrator",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "required": "0",
                            "logged_in_only": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "code_trim": "1",
                            "code_trim_lines": "0",
                            "code_trim_p_brs": "0",
                            "code_trim_extra_lines": "0",
                            "code_sanitize_html": "1",
                            "code_allow_shortcode": "1"
                        },
                        {
                            "name": "test_html",
                            "id": 26,
                            "label": "test html",
                            "description": "",
                            "weight": 1,
                            "type": "html",
                            "html_no_label": "1",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "roles_allowed": "administrator",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "required": "0",
                            "html_trim": "1",
                            "html_trim_lines": "0",
                            "html_trim_p_brs": "0",
                            "html_trim_extra_lines": "0",
                            "html_oembed": "0",
                            "html_wptexturize": "1",
                            "html_convert_chars": "1",
                            "html_wpautop": "1",
                            "html_allow_shortcode": "1"
                        }
                    ]
                }
            ]
        },
        {
            "name": "test_html_field",
            "id": 12,
            "label": "test html fields",
            "description": "",
            "type": "post_type",
            "storage": "meta",
            "label_singular": "test html field",
            "public": "1",
            "show_ui": "1",
            "publicly_queryable": "1",
            "dynamic_features_allow": "inherit",
            "rest_enable": "1",
            "supports_title": "1",
            "supports_editor": "1",
            "_migrated_28": "1",
            "supports_quick_edit": "1",
            "capability_type_extra": "1",
            "capability_type": "page",
            "groups": [
                {
                    "name": "more_fields",
                    "id": 13,
                    "label": "More Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "code_syntax",
                            "id": 14,
                            "label": "Code syntax",
                            "description": "",
                            "weight": 0,
                            "type": "code",
                            "code_max_length": "-1",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "roles_allowed": "administrator",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "required": "0",
                            "logged_in_only": "0",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "code_trim": "1",
                            "code_trim_lines": "0",
                            "code_trim_p_brs": "0",
                            "code_trim_extra_lines": "0",
                            "code_sanitize_html": "1",
                            "code_allow_shortcode": "1"
                        },
                        {
                            "name": "html_content",
                            "id": 15,
                            "label": "HTML content",
                            "description": "",
                            "weight": 1,
                            "type": "html",
                            "html_no_label": "1",
                            "repeatable": "0",
                            "repeatable_format": "default",
                            "default_evaluate_tags": "0",
                            "default_empty_fields": "0",
                            "roles_allowed": "administrator",
                            "revisions_revision_field": "0",
                            "enable_conditional_logic": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "required": "0"
                        }
                    ]
                }
            ]
        }
    ]
}
Pezzab commented 1 week ago

I can't seem to duplicate the precise issue after setting up a separate test site. Though I have a persistent problem with shortcodes not rendering as embeds that I will raise a new issue about