• Resolved Jon Brown

    (@jb510)


    With 2.1.1 I’m getting an incomplete post editor screen. Something breaking in the Apple News metabox.

    I’m seeing two errors. First in PHP
    Error message: Uncaught Error: Call to undefined method Admin_Apple_News::error()
    and ten also in the JS console
    Minified React error #200

    I’m kind of assuming the later is only because of the former.

    Rolling back to 2.1.0 resolves the issue and the post editor works just fine. Reinstalling 2.1.1, boom editor breaks again, rolling back to 2.1.0 again fixes things.

    Full stack trace:

    An error of type E_ERROR was caused in line 100 of the file /nas/content/live/site/wp-content/plugins/publish-to-apple-news/admin/class-admin-apple-sections.php. Error message: Uncaught Error: Call to undefined method Admin_Apple_News::error() in /nas/content/live/site/wp-content/plugins/publish-to-apple-news/admin/class-admin-apple-sections.php:100
    Stack trace:
    #0 /nas/content/live/site/wp-content/plugins/publish-to-apple-news/admin/class-admin-apple-meta-boxes.php(332): Admin_Apple_Sections::get_sections()
    #1 /nas/content/live/site/wp-content/plugins/publish-to-apple-news/admin/partials/metabox-publish.php(43): Admin_Apple_Meta_Boxes::build_sections_field(30403)
    #2 /nas/content/live/site/wp-content/plugins/publish-to-apple-news/admin/class-admin-apple-meta-boxes.php(319): include('/nas/content/li...')
    #3 /nas/content/live/site/wp-admin/includes/template.php(1389): Admin_Apple_Meta_Boxes->publish_meta_box(Object(WP_Post), Array)
    #4 /nas/content/live/site/wp-admin/edit-form-advanced.php(681): do_meta_boxes(Object(WP_Screen), 'side', Object(WP_Post))
    #5 /nas/content/live/site/wp-admin/post-new.php(75): require('/nas/content/li...')
    #6 {main}
      throw
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kevin Fodness

    (@kevinfodness)

    OK, I see what’s happening here. The specific error being triggered is that the plugin couldn’t fetch a list of sections. You should be able to navigate to Apple News > Sections in the WordPress admin, and there is a button on the bottom to refresh the section list. If you click that button and get an error, you will need to resolve it (which could be caused by the channel ID / key / secret not being filled out, or could be caused by your server’s time not being synchronized with a time server). As long as you are able to fetch a list of sections, you shouldn’t encounter an error in that view.

    However, you are correct that this is a bug introduced by the new version. I will create a GitHub issue to track progress on the fix.

    Plugin Author Kevin Fodness

    (@kevinfodness)

    Plugin Author Kevin Fodness

    (@kevinfodness)

    I just released version 2.1.2 which fixes this issue.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Error Call to undefined method Admin_Apple_News::error AND console react err’ is closed to new replies.