Rajesh Khanna Posted November 10, 2015 Share Posted November 10, 2015 Hello , We are developing a website where we have been facing a 404 Error on all new pages those are getting created. We are able to view all the pages those are already created. When we create a new page and try to access the page we get 404 , but we can access all the fields of the page in another page. Url of the page is also correct. Below are the troubleshooting steps we tried but failed to resolve the issue : a) We had procache enabled , so we were having the modifed .htaccess , we changed our .htaccess to original version didtributed alongwith processwire. b) We tried deleting few pages and then recreating them but didnot help in resolution. c) We also tried changing the server but it also didnot resolve the issue. * Rememeber the status of page is publish. Please assist in resolving the issue Link to comment Share on other sites More sharing options...
cstevensjr Posted November 10, 2015 Share Posted November 10, 2015 Please check the permissions on the newly created pages. 1 Link to comment Share on other sites More sharing options...
Rajesh Khanna Posted November 11, 2015 Author Share Posted November 11, 2015 Hello Sir, thanks for your assistance. please find below code which i wrote to test if the page is viewable or not . I got page is viewable and user has the permission to view the page for both guest and admin but still once i go through the url i get 404. $page_is_created = wire("pages")->get("url/of/the/page"); if($page_is_created->viewable())echo "{$page_is_created->id} : page is viewable"; else echo "Page is not viewable"; if($user->hasPermission('page-view', $page_is_created)) { echo "Yes"; } Link to comment Share on other sites More sharing options...
cstevensjr Posted November 11, 2015 Share Posted November 11, 2015 Looking at your image makes me think you are not on a current version of ProcessWire. What are your versions of ProcessWire, PHP? Thanks. Example - Older Version of ProcessWire (2.3.0) Example - New Version of ProcessWire (2.6.22 Dev) Link to comment Share on other sites More sharing options...
Rajesh Khanna Posted November 11, 2015 Author Share Posted November 11, 2015 Hello , Processwire version is 2.6.1 PHP version : 5.5.21 Link to comment Share on other sites More sharing options...
cstevensjr Posted November 11, 2015 Share Posted November 11, 2015 Ok, that's not it. Ensure that your access control permissions on the "home" template are not precluding access to these pages? Are you using any third-party module or code that has the potential to block access to these pages? Link to comment Share on other sites More sharing options...
Rajesh Khanna Posted November 14, 2015 Author Share Posted November 14, 2015 Hello, I completely renamed the module directory but even after doing so the page showed 404 rather than showing error. Also, all the existing pages are viewable except for the new pages getting created. Link to comment Share on other sites More sharing options...
Hantsweb Posted November 15, 2015 Share Posted November 15, 2015 Couple of things spring to mind.1. Are you actually publishing the pages as well as saving them - by default saved pages are set to be unpublished --- if the page is set to unpublished then even though it exists you will not be able to see it via a url. Easiest way to check is look in the pages tree, the page title should show as bold text -- if it has a line through it but it is bold then that's fine, it just means you've not checked the box to have the page appear in menus and/or searches.2.Have you checked in the templates directory that there is a php file with the same name as the template your page is using. If this php file is not present then the page will not display.Hope that helps 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now