• Resolved Dani

    (@danicasati)


    Hi.
    I’m using this shortcode in a private page:

    [customer-area-protected-content type=”cuar_private_page” terms=”2657″ show=”owned” layout=”list” /]

    I pretend to display only owned private pages that are in certain category:

    So I get list of desired pages, but I retrieve this error too:
    Warning: sprintf(): Too few arguments in /web/htdocs/XXXXXXXXX/wp-content/plugins/customer-area/src/php/core-addons/shortcodes/templates/protected-content-shortcode-layout-list-item.template.php on line 12

    How can I fix this?

    https://ww.wp.xz.cn/plugins/customer-area/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Dani

    (@danicasati)

    And if I try to reduce arguments just this:

    [customer-area-protected-content type=”cuar_private_page” taxonomy=”cuar_private_page_category”
    terms=”xxxx” /]

    I retrieve full list of owned pages, not only specified in TERMS parameter.

    Plugin Contributor Vincent Mimoun-Prat

    (@vprat)

    That is not a shortcode problem but a typo in the plugin. Open that file and change line 12 to:

    $subtitle = sprintf( __( 'Published by %s on %s', 'cuar' ), get_the_author_meta( 'display_name' ), get_the_date() );

    in file customer-area/src/php/core-addons/shortcodes/templates/protected-content-shortcode-layout-list-item.template.php

    This should fix the problem. If it does, fix will be available in the next release.

    Thread Starter Dani

    (@danicasati)

    To fix the problem, I need to replace line 23, not 12.

    But a suggestion: Text is displayed in english, the strings are not translated.

    Plugin Contributor Vincent Mimoun-Prat

    (@vprat)

    On my file here, and according to the PHP error message, the problem is on line 12.

    Strings should all be translated, as they are wrapped by __ and _e functions. Which strings are not?

    Thread Starter Dani

    (@danicasati)

    I get error message on line 12 too, but that line is blank on my file.

    If I replace line 23, error disappears.

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

The topic ‘"Too few arguments" error’ is closed to new replies.