• Your plugin attaches to the admin_footer_text filter like it’s an action, and returns nothing (null), clearing the existing content. This can cause other plugins that expect a string to throw a type error. There is a better action hook that fires after the footer.

    Here’s the patch. It also fixes a few things with the uploader: later permission check; close & cancel buttons not reloading page; and better input parsing.

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

    (@lev0)

    Looks like this forum breaks data: URIs, but you can just add the scheme back to that link’s href to fix it.

    Plugin Author notetoservices

    (@notetoservices)

    Thanks for pointing out the error and supplying a fix. I applied your patch and sent the update to the SVN repository.

    Thread Starter Roy Orbitson

    (@lev0)

    Thanks but you missed a bunch of the fixes in that patch: moving the permission check to after page check (permissions are irrelevant if you’re on the wrong page, and they’re slower to check); you lost the href="#" on the close/cancel buttons that avoid a full page reload; and you still have the @media CSS that’s no longer needed because the popup markup is now outside the footer.

    Any reason you excluded the other improvements? Did you have problems with the patch as it was?

    Plugin Author notetoservices

    (@notetoservices)

    Your changes were implemented. There was one thing you proposed that broke the code where the openUMBU div is, so I couldn’t implement it, and I wasn’t exactly sure what you were doing.

    The page reload comes to refresh the page data. I hadn’t realized you had changed some CSS so that was updated as well. It should be in the latest version coming soon.

    Thread Starter Roy Orbitson

    (@lev0)

    Oh, sorry about that. I added admin_url('upload.php') for the form action in my patched version and it works again. I used printf with esc_attr__() and esc_html__(), as it’s not advisable to pass raw HTML for translation.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error in admin (with patch)’ is closed to new replies.