• Resolved josephorr

    (@josephorr)


    Hello! Everything is connected, and I followed the instructions perfectly. However, I received a fatal error when I tried to PUSH one article to Apple for review.

    Error: There has been a critical error on this website.

    I turned on debugging and here are the details of the log – by reading this, is there anything I can do to fix the issue to continue on?

    #### START ERROR MESSAGE ####

    [05-May-2022 19:51:12 UTC] PHP Warning:  Undefined array key "conditional" in /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/components/class-body.php on line 161
    [05-May-2022 19:51:12 UTC] PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/components/class-body.php:161
    Stack trace:
    #0 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/components/class-body.php(161): array_merge(Array, NULL)
    #1 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/components/class-component.php(225): Apple_Exporter\Components\Body->register_specs()
    #2 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/class-component-factory.php(181): Apple_Exporter\Components\Component->__construct('<p>Months befor...', Object(Apple_Exporter\Workspace), Object(Apple_Exporter\Settings), Object(Apple_Exporter\Builders\Component_Text_Styles), Object(Apple_Exporter\Builders\Component_Layouts), NULL, Object(Apple_Exporter\Builders\Component_Styles))
    #3 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/class-component-factory.php(212): Apple_Exporter\Component_Factory::get_component('p', '<p>Months befor...')
    #4 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/builders/class-components.php(515): Apple_Exporter\Component_Factory::get_components_from_node(Object(DOMElement))
    #5 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/builders/class-components.php(803): Apple_Exporter\Builders\Components->get_components_from_node(Object(DOMElement))
    #6 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/builders/class-components.php(42): Apple_Exporter\Builders\Components->split_into_components()
    #7 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/builders/class-builder.php(66): Apple_Exporter\Builders\Components->build()
    #8 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/class-exporter.php(219): Apple_Exporter\Builders\Builder->to_array()
    #9 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/class-exporter.php(144): Apple_Exporter\Exporter->generate_json()
    #10 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/admin/apple-actions/index/class-push.php(560): Apple_Exporter\Exporter->generate()
    #11 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/admin/apple-actions/index/class-push.php(297): Apple_Actions\Index\Push->generate_article()
    #12 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/admin/apple-actions/index/class-push.php(92): Apple_Actions\Index\Push->push(NULL)
    #13 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/admin/class-admin-apple-index-page.php(395): Apple_Actions\Index\Push->perform()
    #14 /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/admin/class-admin-apple-index-page.php(167): Admin_Apple_Index_Page->push_action(25414)
    #15 /nas/content/live/newflwn/wp-includes/class-wp-hook.php(307): Admin_Apple_Index_Page->page_router('')
    #16 /nas/content/live/newflwn/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
    #17 /nas/content/live/newflwn/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
    #18 /nas/content/live/newflwn/wp-admin/admin.php(175): do_action('admin_init')
    #19 {main}
      thrown in /nas/content/live/newflwn/wp-content/plugins/publish-to-apple-news/includes/apple-exporter/components/class-body.php on line 161

    #### END ERROR MESSAGE ####

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kevin Fodness

    (@kevinfodness)

    Hi @josephorr

    I apologize for the delay—I somehow missed this issue coming in.

    I’ve reviewed the code and I’m perplexed as to how this could occur. Is it possible that you have modified the plugin code in some way? I would recommend fully removing the plugin’s files and reinstalling from www.ads-software.com and seeing if the issue is reproducible. I haven’t heard of others experiencing the same issue, so my guess is that it’s related to something on your environment (files or PHP version, perhaps).

    Plugin Author Kevin Fodness

    (@kevinfodness)

    Moving this over to GitHub to consolidate the discussion: https://github.com/alleyinteractive/apple-news/issues/935

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal Error When Publishing’ is closed to new replies.