Custom Post Type – Critical Errors on Draft Preview

Posted in: Newspaper
Post count: 3

I have a few different custom post types that were made based on this tutorial https://forum.tagdiv.com/topic/how-to-create-a-custom-single-template/

Published posts appear to work correctly but if I go to preview a draft post I get the following error on the preview page “There has been a critical error on this website.” just after the author section.

I also get this in my error log:
[29-Mar-2021 13:59:26 UTC] PHP Warning: require(/home/itwc/public_html/wp-content/themes/Newspaper-child): failed to open stream: No such file or directory in /home/itwc/public_html/wp-includes/comment-template.php on line 1554
[29-Mar-2021 13:59:26 UTC] PHP Fatal error: require(): Failed opening required ‘/home/itwc/public_html/wp-content/themes/Newspaper-child/’ (include_path=’.:/usr/share/php’) in /home/itwc/public_html/wp-includes/comment-template.php on line 1554

It seems to center around the comments section. Both where the error appears on the preview and in the error message itself.

If it helps narrow it down, during troubleshooting, I discovered this: https://wordpress.org/support/topic/newspaper-theme-error/

And using the solution, the critical error is gone but it does distort the display of the sidebar and creates additional display issues.

Post count: 27744

Hello,

Please make a full backup to all files and the database and remove that code from functions.php and contact us via email at contact@tagdiv.com . Provide
– admin url and credentials
– cPanel url and credentials
– A link to this topic in order to identify you

Our team will take a look!

Thank you!

Post count: 42

Hey, did you find a solution for this? I have the same problem. Image not showing in post preview (dark grey/black) and on the bottom of the preview article page i get:
There has been a critical error on this website.

Learn more about troubleshooting WordPress.

Post count: 27744

Hi, @oposum

Please make sure that all theme requirements were set as in our guide https://forum.tagdiv.com/requirements-for-newspaper/ you can try to double the wp memory limit, and please make sure you do not have a plugin conflict.
Here is an article about how to fix this problem:
There has been a critical error on your website.
Also, please check the permalinks and re-save them -> https://i.imgur.com/MQPtVzl.png
Hope it will help you!

Thank you!

Post count: 42

Requirements are set, except the caching plugin as we use cloudflare.
https://imgur.com/a/ssTYJy1

Permalinks are set to /%category%/%postname%/, as it’s supposed to be good for SEO.

PHP version is 7.4.
There is no php.ini file, should i create one for the

Windows:
1) Edit php.ini and search for the following lines:

;extension=php_mbstring.dll
;extension=php_gd2.dll

Post count: 35449

Hi oposum, you just need to make sure that the GD library and mbstring are enable in your php extension, from your screenshot those are enable, therefore is no need for php.ini file.
Please just make sure that you have tested using only theme plugins and if the problem persist, please contact us via email at contact@tagdiv.com . Provide admin url and credentials cPanel url and credentials and include all details in email.
Thank you!

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.