Title: Error when creating new posts
Last modified: July 1, 2023

---

# Error when creating new posts

 *  Resolved [adrienneamari](https://wordpress.org/support/users/adrienneamari/)
 * (@adrienneamari)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/)
 * 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:
 *     ```wp-block-code
       WordPress version 6.2.2Active 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:777Stack 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](https://wordpress.org/support/users/mikeatkaizencoders/)
 * (@mikeatkaizencoders)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16864283)
 * 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](https://wordpress.org/support/users/mikeatkaizencoders/)
 * (@mikeatkaizencoders)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16866685)
 * 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](https://wordpress.org/support/users/adrienneamari/)
 * (@adrienneamari)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16872897)
 * 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:801Stack 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](https://wordpress.org/support/users/mikeatkaizencoders/)
 * (@mikeatkaizencoders)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16872927)
 * Hello,
 * Can you please Save Settings and try one more time?
 *  Plugin Author [Mike L](https://wordpress.org/support/users/mikeatkaizencoders/)
 * (@mikeatkaizencoders)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16875219)
 * Hello,
   Just following up with you on this issue. Did you try save settings and
   check?
 *  Thread Starter [adrienneamari](https://wordpress.org/support/users/adrienneamari/)
 * (@adrienneamari)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16876289)
 * 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.

 * ![](https://ps.w.org/url-shortify/assets/icon-256x256.png?rev=3550500)
 * [URL Shortify - Simple and Easy URL Shortener](https://wordpress.org/plugins/url-shortify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/url-shortify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/url-shortify/)
 * [Active Topics](https://wordpress.org/support/plugin/url-shortify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/url-shortify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/url-shortify/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 10 replies
 * 2 participants
 * Last reply from: [adrienneamari](https://wordpress.org/support/users/adrienneamari/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/error-when-creating-new-posts/#post-16876289)
 * Status: resolved