Support » Plugin: Lightbox Plus Colorbox » Undefined variable missing argument

  • gallantfish


    I don’t remember the error, whether it was undefined variable or missing argument, or undefined value in object… but In my case, version 2.6, I found out the problem is a typo on the conditionals.

    The use_forpost and use_forpage values are checked for existence EVEN if their parent use_perpage parent option is not selected, trowing an error. It seems like the author recycled the use_forpage piece of code to make the use_perpage piece of code, or confused the variable names, or I’m just breaking it for when I eventually need them selected, but it works for me now.

    In line 182, Instead of

    if ((isset($lightboxPlusOptions['use_forpage']) && $lightboxPlusOptions['use_forpage'] == '1') || (isset($lightboxPlusOptions['use_forpost']) && $lightboxPlusOptions['use_forpost'] == '1')) {

    change it to

    if ((isset($lightboxPlusOptions['use_perpage']) && $lightboxPlusOptions['use_forpage'] == '1') || (isset($lightboxPlusOptions['use_perpage']) && $lightboxPlusOptions['use_forpost'] == '1')) {

    Or just CHECK the parent post/page option so the children options show, UN-CHECK the child page and post options and then un-check the parent again, and save.

  • The topic ‘Undefined variable missing argument’ is closed to new replies.