• Resolved adrienneamari

    (@adrienneamari)


    Hello,

    After installing this plugin, when I go to create a new post on my website, it doesn’t allow me, and I get an error that something went wrong.

    This is the log that was sent to my admin email:

    WordPress version 6.2.2
    Active theme: Avant (version 11.0.0)
    Current plugin: URL Shortify (version 1.7.1)
    PHP version 8.0.29 Error Details
    =============
    An error of type E_ERROR was caused in line 777 of the file /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php. Error message: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php:777
    Stack trace:
    #0 /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php(777): in_array()
    #1 /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php(842): Kaizen_Coders\Url_Shortify\Common\Actions->_add_short_link_to_content()
    #2 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/class-wp-hook.php(310): Kaizen_Coders\Url_Shortify\Common\Actions->add_short_link_to_excerpt()
    #3 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #4 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1871): apply_filters()
    #5 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(569): WP_REST_Posts_Controller->prepare_item_for_response()
    #6 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1181): WP_REST_Posts_Controller->get_item()
    #7 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request()
    #8 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api.php(535): WP_REST_Server->dispatch()
    #9 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api.php(2889): rest_do_request()
    #10 [internal function]: rest_preload_api_request()
    #11 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/block-editor.php(634): array_reduce()
    #12 /homepages/41/d4297421118/htdocs/wordpress/wp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload()
    #13 /homepages/41/d4297421118/htdocs/wordpress/wp-admin/post-new.php(72): require('/homepages/41/d...')
    #14 {main}
      thrown

    Any help would be appreciated!
    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mike L

    (@mikeatkaizencoders)

    Hello,

    Thanks for reaching out to us.

    Sorry to hear that you are facing an issue.

    We have checked and found that the issue is happening in specific use case. We will fix this issue and release a new version Today.

    We will inform you once we will release a new version with the fix.

    Plugin Author Mike L

    (@mikeatkaizencoders)

    Hello,

    Glad to inform you that we have fixed this issue and released a new version of URL Shortify 1.7.2.

    Please upgrade to URL Shortify 1.7.2 and then go to URL Shortify > Settings and click on Save Settings to save settings.

    After doing this you shouldn’t be able to receive this error again.

    Please check and confirm the fix.

    Thread Starter adrienneamari

    (@adrienneamari)

    Thank you! I have updated the plugin, but I’m still getting the same issue. I can’t make a new post at all with the plugin activated.

    This is what was sent to my email with the errors. If it’s something else that I’m doing or using causing it, please let me know!

    Error Details
    =============
    An error of type E_ERROR was caused in line 801 of the file /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php. Error message: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php:801
    Stack trace:
    #0 /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php(801): in_array()
    #1 /homepages/41/d4297421118/htdocs/wordpress/wp-content/plugins/url-shortify/lite/includes/Common/Actions.php(866): Kaizen_Coders\Url_Shortify\Common\Actions->_add_short_link_to_content()
    #2 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/class-wp-hook.php(310): Kaizen_Coders\Url_Shortify\Common\Actions->add_short_link_to_excerpt()
    #3 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #4 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1871): apply_filters()
    #5 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(569): WP_REST_Posts_Controller->prepare_item_for_response()
    #6 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1181): WP_REST_Posts_Controller->get_item()
    #7 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1028): WP_REST_Server->respond_to_request()
    #8 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api.php(535): WP_REST_Server->dispatch()
    #9 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/rest-api.php(2889): rest_do_request()
    #10 [internal function]: rest_preload_api_request()
    #11 /homepages/41/d4297421118/htdocs/wordpress/wp-includes/block-editor.php(634): array_reduce()
    #12 /homepages/41/d4297421118/htdocs/wordpress/wp-admin/edit-form-blocks.php(77): block_editor_rest_api_preload()
    #13 /homepages/41/d4297421118/htdocs/wordpress/wp-admin/post-new.php(72): require(‘/homepages/41/d…’)
    #14 {main}
    ? thrown

    Plugin Author Mike L

    (@mikeatkaizencoders)

    Hello,

    Can you please Save Settings and try one more time?

    Plugin Author Mike L

    (@mikeatkaizencoders)

    Hello,

    Just following up with you on this issue. Did you try save settings and check?

    Thread Starter adrienneamari

    (@adrienneamari)

    Hi,

    I just gave it a try like you suggested, and it works perfectly!

    Thank you so much for getting that fixed!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error when creating new posts’ is closed to new replies.