• iantresman

    (@iantresman)


    Using a fresh WP install, I added the shortcode [repeater] to a new post, and on viewing it, I get a fatal error (Details below). I have only the Classic Editor installed, and nothing else (I do not have ACF installed).

    Fatal error screenshot here

    Text:
    Fatal error: Uncaught Error: Call to undefined function have_rows() in C:\Users\user\Local Sites\test\app\public\wp-content\plugins\custom-content-shortcode\includes\optional\acf.php on line 161
    ( ! ) Error: Call to undefined function have_rows() in C:\Users\user\Local Sites\test\app\public\wp-content\plugins\custom-content-shortcode\includes\optional\acf.php on line 161
    Call Stack
    # Time Memory Function Location
    1 0.0001 413632 {main}( ) …\index.php:0
    2 0.0001 413904 require( ‘C:\Users\user\Local Sites\test\app\public\wp-blog-header.php’ ) …\index.php:17
    3 0.0514 2816608 require_once( ‘C:\Users\user\Local Sites\test\app\public\wp-includes\template-loader.php’ ) …\wp-blog-header.php:19
    4 0.0531 2870560 include( ‘C:\Users\user\Local Sites\test\app\public\wp-content\themes\twentytwenty\singular.php’ ) …\template-loader.php:106
    5 0.0742 3050168 get_template_part( ) …\singular.php:24
    6 0.0742 3050736 locate_template( ) …\general-template.php:168
    7 0.0744 3050864 load_template( ) …\template.php:672
    8 0.0744 3051312 require( ‘C:\Users\user\Local Sites\test\app\public\wp-content\themes\twentytwenty\template-parts\content.php’ ) …\template.php:725
    9 0.0777 3052888 the_content( ) …\content.php:36
    10 0.0777 3052912 apply_filters( ) …\post-template.php:253
    11 0.0777 3053312 WP_Hook->apply_filters( ) …\plugin.php:206
    12 0.0782 3055872 CCS_Plugin->ccs_content_filter( ) …\class-wp-hook.php:287
    13 0.0782 3055872 do_ccs_shortcode( ) …\custom-content-shortcode.php:314
    14 0.0782 3055872 do_local_shortcode( ) …\global.php:43
    15 0.0783 3057968 preg_replace_callback ( ) …\local-shortcodes.php:243
    16 0.0794 3133424 do_local_shortcode_tag( ) …\local-shortcodes.php:243
    17 0.0794 3133856 CCS_To_ACF->loop_through_acf_field( ) …\local-shortcodes.php:363

    • This topic was modified 6 years ago by iantresman.
Viewing 4 replies - 1 through 4 (of 4 total)
  • codemonkeynorth

    (@codemonkeynorth)

    I believe [repeater] is ACF-specific

    it uses this function https://www.advancedcustomfields.com/resources/have_rows/

    I guess ideally it should check for existence of the function before trying to use it though

    Thread Starter iantresman

    (@iantresman)

    In this case, I do have ACF enabled (the shortcode is ignore if it is not enabled). Other tags that cause fatal errors include:

    • [flex]
    • [acf_gallery]

    So perhaps certain ACF modules need to be enabled for some shortcodes?

    codemonkeynorth

    (@codemonkeynorth)

    Flexible Content, Repeater and Gallery fields are all Pro features
    https://www.advancedcustomfields.com/pro/

    would be better if those CCS shortcodes failed silently though, if the user does not have Pro.

    Plugin Author Eliot Akira

    (@miyarakira)

    Thank you for reporting this issue. Yes, this should be handled better, shortcodes that depend on ACF should “fail gracefully” when it’s not installed and active.

    Will let you know when it’s solved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Fatal error using [repeater]’ is closed to new replies.