Homepage › Forum › Product Support › BeStruct › When manually displaying 404 errors, the page is empty
Tagged: 404 error page
- This topic has 29 replies, 2 voices, and was last updated 5 years, 2 months ago by
Jackie.
-
AuthorPosts
-
5 years, 3 months ago #22906
Hello!
There was a question. I think this is a bug.
In the functions.php file, we have written the following code:
$url = $_SERVER['REQUEST_URI'];
if ( ($url == '/blog/') || ($url == '/category/articles/') ) {
global $wp_query;
$wp_query->set_404();
status_header( 404 );
nocache_headers();
include( get_query_template( '404' ) );
die();
} else {}
This code raises 404 error and includes 404.php file
But there was a problem.
The 404 page itself works correctly. Example: https://proremdom.ru/dfs
But those pages are just a blank sheet. Example: https://proremdom.ru/blog/
The title contains the correct 404. But the page itself did not load.
If you hide the line in the header.php file: $ yolo_footer_id = yolo_include_footer_id (); http://joxi.ru/L21ZbD5T0z51zA Then you get the following: http://joxi.ru/823RpDWc8aoLnm
I do not know why this happens. But it shouldn't work that way.
Please help with this problem
5 years, 3 months ago #229075 years, 3 months ago #22911Hi.
Thank you for contacting us.
Please give us admin permission again. We need access to your site and check some config.
Thanks.
5 years, 3 months ago #22919What mail should you send access to?
5 years, 3 months ago #22920Sent access to the mail [email protected]
5 years, 3 months ago #22924Yes, you can send your site info to that email or using the Private reply option on our support site. Only the post author and our supporter can see your private post.
Please check it and let us know soon.
Thanks.
5 years, 3 months ago #22926This reply has been marked as private.5 years, 3 months ago #22934Hi again.
We have checked your site and found the issue from your child-theme.
As I see, you customize the theme and copy a lot of files to child theme. That is why some functions can't work on the child theme.
Please custom the function or hook to customize the parent theme. Or you should know what do you do.
Thanks.
5 years, 3 months ago #22940Yes, we copied the files to change them. Often, to substitute another code or translation.
What hook should you write? Right now I don't understand the problem of the error. The 404 page should be connected. But why doesn't it work?
5 years, 3 months ago #22941As I see, you have also overwritten the core file in the framework, that is the reason some function missing. Please do not overwrite the core file, you should overwrite the function in function.php file.
Please give us the FTP account. We will help you check the current issue.
Thanks.
5 years, 2 months ago #22952Can you remove these errors? After testing, you need to hide them, not leave them.
5 years, 2 months ago #22953Very urgent! Since it is impossible to work!
5 years, 2 months ago #22954I do not understand. Why didn't you remove the errors after checking? Tell me where to fix it.
5 years, 2 months ago #22955Now we have done Back Up for 09/16/2020. But there were more mistakes. Apparently you have changed something up to this point.
We urgently need to fix everything!
5 years, 2 months ago #22956In general ... did not wait. I found it myself. If you enable WP error output, then at least next time write. Since I had to look everywhere. And only at the end I thought to look there.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.
