Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1415977

    Hey there,

    this is kind of a plugin incompatibility caused by “gravityview”. They register a shortcode with the name “gv\widgets\page_size”. Which is totally legit. When you add this shortcode name to your test Regex in class-shortcode-parser.php the “\p” triggers the error as it is a reserved group in Regex:

    Warning [2] Error (E_WARNING): “preg_match_all(): Compilation failed: unknown property name after \P or \p at offset 9320“ at ./wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/class-shortcode-parser.php:607.

    Obviously you cannot simply add any given shortcode to a regex without sanitizing it first. In this case: escaping possible illegal characters like “\”.

    Here is the call stack:

    
    preg_match_all,
    ShortcodeParser->balance_shortcode,
    ShortcodeParser->parse_shortcode,
    ShortcodeHelper::clean_up_shortcode,
    aviaShortcodeTemplate->shortcode_handler_prepare,
    do_shortcode_tag,
    preg_replace_callback,
    do_shortcode,
    av_privacy_class->handler_wp_footer_cookie_consent_bar,
    WP_Hook->apply_filters,
    WP_Hook->do_action,
    do_action(<code>wp_footer</code>),
    wp_footer,
    require_once(<code>/themes/enfold/footer.php</code>),
    load_template,
    locate_template,
    get_footer,
    include(<code>/themes/enfold/index.php</code>),
    require_once(<code>wp-includes/template-loader.php</code>),
    require(<code>wp-blog-header.php</code>)
    

    Running Enfold 5.6.2. But I don’t think you fixed something like this in the more recent versions ;-).

    Thanks and best regards,

    Jan

    #1415987

    Hey Jan,
    I believe this was addressed in v5.6.4 based on this thread.
    Please try updating.

    Best regards,
    Mike

    #1415996

    Hey Mike,

    perfect :-) I guess I missed that in the changelog then.
    Thanks for pointing it out to me.

    Best,
    Jan

    #1416003

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘class-shortcode-parser.php – preg_match_all(): Compilation failed’ is closed to new replies.