Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1421436

    My ALB post element displays the following error on the frontend:

    Warning: preg_replace(): Unknown modifier ‘<‘ in /home/tegmedia/public_html/lowestofthelow.com/site/wp-content/themes/enfold/includes/helper-post-format.php on line 315

    when I include a post for which I’ve set “Link” as the post type. If I set the post to “Standard” type, I don’t see this error.

    This post is configured without ALB, non block editor. The first line in the post is the link, but I have modified the visible text of the link.

    #1421448

    Hey ilowelife,

    Thank you for the inquiry.

    Did you modify the file? Looks like there is an error around line 315. Please download the latest version of the theme, get a copy of the includes/helper-post-format.php then override the current file. Let us know if this helps.

    Best regards,
    Ismael

    #1421456

    Hello @Ismael.

    No, I did not replace the file. I re-uploaded the file from the source and the error continues to appear if the post type is set to link.
    I’ve tested further and the error only occurs with link type posts. Any other post format is fine.

    The content of the post is:

    <a href="https://www.merchsmerch.com/" target="_blank" rel="noopener">Online Merch from Lowest of the Low!</a>
    
    Mugs? <strong>Check!</strong>
    
    T-shirts? <strong>Check!</strong>
    
    Keychains, hoodies, posters, pins, hats, toques, and more!
    
    [av_button label='Go Shopping!' icon_select='yes' icon='ue859' font='entypo-fontello' link='manually,https://www.merchsmerch.com/' link_target='_blank' size='small' position='center' label_display='' title_attr='' size-text='' av-desktop-font-size-text='' av-medium-font-size-text='' av-small-font-size-text='' av-mini-font-size-text='' margin='' margin_sync='true' padding='' padding_sync='true' av-desktop-margin='' av-desktop-margin_sync='true' av-desktop-padding='' av-desktop-padding_sync='true' av-medium-margin='' av-medium-margin_sync='true' av-medium-padding='' av-medium-padding_sync='true' av-small-margin='' av-small-margin_sync='true' av-small-padding='' av-small-padding_sync='true' av-mini-margin='' av-mini-margin_sync='true' av-mini-padding='' av-mini-padding_sync='true' color_options='' color='theme-color' custom_bg='#444444' custom_font='#ffffff' btn_color_bg='theme-color' btn_custom_grad_direction='vertical' btn_custom_grad_1='#000000' btn_custom_grad_2='#ffffff' btn_custom_grad_3='' btn_custom_grad_opacity='0.7' btn_custom_bg='#444444' btn_color_bg_hover='theme-color-highlight' btn_custom_bg_hover='#444444' btn_color_font='theme-color' btn_custom_font='#ffffff' btn_color_font_hover='white' btn_custom_font_hover='#ffffff' border='' border_width='' border_width_sync='true' border_color='' border_radius='' border_radius_sync='true' box_shadow='' box_shadow_style='0px,0px,0px,0px' box_shadow_color='' animation='' animation_duration='' animation_custom_bg_color='' animation_z_index_curtain='100' hover_opacity='' sonar_effect_effect='' sonar_effect_color='' sonar_effect_duration='1' sonar_effect_scale='' sonar_effect_opac='0.5' css_position='' css_position_location=',,,' css_position_z_index='' av-desktop-css_position='' av-desktop-css_position_location=',,,' av-desktop-css_position_z_index='' av-medium-css_position='' av-medium-css_position_location=',,,' av-medium-css_position_z_index='' av-small-css_position='' av-small-css_position_location=',,,' av-small-css_position_z_index='' av-mini-css_position='' av-mini-css_position_location=',,,' av-mini-css_position_z_index='' id='' custom_class='' template_class='' element_template='' one_element_template='' av_uid='av-2gs7zi' sc_version='1.0' admin_preview_bg='']
    #1421458

    Hi,

    Thank you for the info.

    We created a post with link format, but we were not able to reproduce the same issue on our end. Please provide the WP and S/FTP details in the private field so that we can check the issue further.

    Best regards,
    Ismael

    #1421495

    Hello. I’m not permitted to give you s/ftp access to the site (I don’t own access to the server).

    However, I tried an experiment on another Enfold site I manage:

    • created a post with link format. used THE EXACT SAME POST CONTENT as I shared above (I copy and pasted from the text tab of the standard WP post editor)
    • created a test page, enabled ALB
    • added a Blog Posts element from ALB to test page
    • published and viewed

    Result
    I get the same error message on this site.

    So, I played around a bit more. The issue seems to be with the link itself:

    Online Merch from Lowest of the Low!

    If this link is the first line in the post, then it produces the error message.
    If any non-space character precedes the link, (I tried an   entity), then the error doesn’t happen. So, if I wrap the link in a <p> element it’s fine.

    I think your regex musn’t be happy with the starting < character it encounters as the first line of the string.

    If I get a chance I’ll try this on a clean install, but perhaps you could test at your end?

    • This reply was modified 1 year, 1 month ago by ilowelife.
    #1421612

    Hi,

    Thank you for investigating the issue further.

    When we do this on our end, the error doesn’t occur but the whole link is applied as the post title. What happens when you remove the a or link tag and just add the URL at the very beginning of the content?

    https://www.merchsmerch.com/
    
    Mugs? <strong>Check!</strong>
    
    T-shirts? <strong>Check!</strong>
    
    Keychains, hoodies, posters, pins, hats, toques, and more!
    

    Best regards,
    Ismael

    #1421672

    Yes, that’s consistent with what I saw. In fact, the reason I changed the link text was because of the behaviour you describe. I didn’t want the URL to be the title of the post in the ALB blog list.

    For the time being, I’ve thrown in a non breaking space entity to prevent the error from appearing.

    #1421862

    Hi,

    Thank you for the information.

    We have escalated the issue to our team’s channel so that the rest of the team can review it. In the meantime, please continue using the temporary solution

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.