• Resolved marketmataro

    (@marketmataro)


    Hello,
    I have installed the module and translated the languages with WPML.
    On the web, the module is shown correctly in both languages, but if I ckick on show more, the categories appear but clicking on the drop-down the following errors appear:

    Notice: Undefined variable: posts in /xxx/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 266

    Notice: Undefined variable: posts in /xxx/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 272

    Notice: Undefined variable: posts in /xxx/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 301

    Warning: count (): Parameter must be an array or an object that implements Countable in /xxx/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 301

Viewing 3 replies - 1 through 3 (of 3 total)
  • r3ynolds

    (@r3ynolds)

    Hi!

    i have the same problem

    Notice: Undefined variable: posts in /xxx/www/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 266

    Notice: Undefined variable: posts in /xxx/www/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 272

    Notice: Undefined variable: posts in /xxx/www/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 301

    Warning: count(): Parameter must be an array or an object that implements

    Countable in /xxx/www/wp-content/plugins/cookie-law-info/public/modules/shortcode/shortcode.php on line 301

    Any ideas?

    Thanks

    r3ynolds

    (@r3ynolds)

    @marketmataro i found the problem, when you translate the plugin following the documentation from https://www.webtoffee.com/translating-gdpr-cookie-consent-plugin-with-wpml/

    once you find the strings in the new language, then go to WPML/Traslate taxonomies/ and select cookies categories, you can copy the content from the category to the new language from there. The problem is that when the category name is changed you also have to change the name of the shortcode inside the category description in the the new language, exm:

    [cookie_audit category=”analytics” style=”winter” columns=”cookie,duration,description”]

    [cookie_audit category=”xxxx” style=”winter” columns=”cookie,duration,description”]

    Thread Starter marketmataro

    (@marketmataro)

    Fantastic r3ynolds,

    It works

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Notice: Undefined variable: posts in shortcode.php’ is closed to new replies.