• Resolved DannyCooper

    (@dannycooper)


    Hey Ben,

    I’m seeing this error on the frontend when using the Gutenberg block:

    Notice: Undefined variable: urlcustom in /app/public/wp-content/plugins/better-click-to-tweet/assets/block/init.php on line 80

    For reference I’m using the block with no settings configured.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    How did you create that block?

    I was able to recreate a similar issue by importing a bloc, but I’m at a bit of a loss to figure out how else to create it or to fix it.

    If you can get me some steps to reliably recreate the issue, I am happy to keep looking into it, but I fear I’m out of my React depth. ??

    Thread Starter DannyCooper

    (@dannycooper)

    Hi Ben,

    Looking at the code, could it be that because you didn’t set a default here:

    https://github.com/Benunc/better-click-to-tweet/blob/master/assets/block/init.php#L55

    The variable doesn’t exist for you to extract on line 74?

    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    Excellent. I will test to see if that makes a difference. Thanks so much for taking the time to look into this.

    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    That seems to have fixed it. the default is false for the attribute.

    I am going to run some more tests and then ship this. Thanks again for the help.

    Plugin Author Ben Meredith

    (@benmeredithgmailcom)

    5.7.2 is now out in the wild. let me know if you are still seeing anything wonky.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Notice: Undefined variable’ is closed to new replies.