sambadave Posted November 11, 2015 Share Posted November 11, 2015 Hey folks. My client has just mentioned that they can't add any pages on their site. I went to have a look and it appears that the tree nav is all over the place. For some reason my tree nav is caught in an endless loop where random admin specific pages keep repeating inside? It goes on for ever. When you click in to a page it uses the same page id, regardless of where in the tree nav you select it from so I'm scared to go deleting pages. Can anyone help me here? Link to comment Share on other sites More sharing options...
MuchDev Posted November 11, 2015 Share Posted November 11, 2015 What is your pw version and browser? Have you tried another browser. I would possibly update processwire as that looks to be either a corrupt file in the pw core or a problem with your browser. Link to comment Share on other sites More sharing options...
sambadave Posted November 11, 2015 Author Share Posted November 11, 2015 Hi MuchDev. Thanks for helping out. I'm using version 2.5.3. I was using Firefox but just tried in Chrome too and the same problem exists there too. I'll try and upgrade and let you know how I get on. Do you think there's a good chance that upgrading would fix this? I wasn't sure if "Menus" might be some sort of admin specific name and that's why all the admin pages have jumped in there? The error log is saying this (I've masked out my site url): 2015-11-11 17:09:34 admin Module ProcessPageEdit failed init - Unknown page 2015-11-11 17:09:34 admin Module ProcessPageEdit failed init - Unknown page 2015-11-11 17:09:34 admin Error: Call to a member function is() on a non-object (line 106 of /home/viceroyf/public_html/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module) 2015-11-11 17:09:37 admin Module ProcessPageEdit failed init - Unknown page 2015-11-11 17:09:37 admin Module ProcessPageEdit failed init - Unknown page 2015-11-11 17:09:37 admin Error: Call to a member function is() on a non-object (line 106 of /home/viceroyf/public_html/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module) 2015-11-11 17:09:38 admin Module ProcessPageEdit failed init - Unknown page 2015-11-11 17:09:38 admin Module ProcessPageEdit failed init - Unknown page 2015-11-11 17:09:38 admin Error: Call to a member function is() on a non-object (line 106 of /home/viceroyf/public_html/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module) 2015-11-11 17:12:18 admin Error: Maximum execution time of 30 seconds exceeded (line 165 of /home/viceroyf/public_html/wire/core/Field.php) 2015-11-11 17:12:18 ? Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /home/viceroyf/public_html/wire/core/DatabaseQuery.php line 91) 2015-11-11 17:12:18 ? Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /home/viceroyf/public_html/wire/core/DatabaseQuery.php line 91) 2015-11-11 17:14:06 admin Error: Maximum execution time of 30 seconds exceeded (line 922 of /home/viceroyf/public_html/wire/core/Pages.php) 2015-11-11 17:16:03 admin Error: Maximum execution time of 30 seconds exceeded (line 933 of /home/viceroyf/public_html/wire/core/Pages.php) 2015-11-11 18:13:22 admin Error: Maximum execution time of 30 seconds exceeded (line 938 of /home/viceroyf/public_html/wire/core/Pages.php) 2015-11-11 19:04:56 admin Error: Maximum execution time of 30 seconds exceeded (line 677 of /home/viceroyf/public_html/wire/core/Page.php) Link to comment Share on other sites More sharing options...
MuchDev Posted November 11, 2015 Share Posted November 11, 2015 Well I can't say for sure that upgrading will fix it per say, but it shouldn't hurt and it will give you access to all of the great work that has gone into processwire since that version. Just make sure that you don't update to version 3.0, I would stick with stable (currently 2.6.1). Link to comment Share on other sites More sharing options...
sambadave Posted November 11, 2015 Author Share Posted November 11, 2015 Thanks MuchDev. I don't appear to be getting the crazy never ending page tree now which is great. I can edit pages fine, but still can't add pages without getting the following error after clicking "save" on the "Add New" screen. Error: Maximum execution time of 30 seconds exceeded (line 1896 of /Applications/MAMP/htdocs/viceroy/wire/core/Pages.php) I wouldn't have thought ProcessWire would be struggle to create a page in 30 seconds? Link to comment Share on other sites More sharing options...
sambadave Posted November 12, 2015 Author Share Posted November 12, 2015 Sorry folks, I'm having no luck tonight. I can't add any new pages, fields or templates... and I'm not sure if there are any other hidden errors that I haven't come across yet. I'm no SQL expert here but after a bit of looking around I think my database might have fudged at some point (most likely when I was exporting / importing). The client hasn't had to create any new pages until now so I think it's been hiding for a while. It appears to have something to do with auto incrementing and primary keys. Like I say I'm no expert here so after a little bit of editing in phpmyadmin I've managed to sort out some of the problems. I'm not 100% confident with any of the changes I've made and I'm not sure if there might be a lot of other stuff under the bonnet that I'm not aware of that still needs looked at. Can anyone give me any pointers as to how I can begin to fix this? Link to comment Share on other sites More sharing options...
Wanze Posted November 12, 2015 Share Posted November 12, 2015 Hi sambadave, Error: Maximum execution time of 30 seconds exceeded (line 1896 of /Applications/MAMP/htdocs/viceroy/wire/core/Pages.php) Can you post the code around this line in Pages.php? I'm not sure on which version you are now. If it's database related, and the database is corrupt: Generate a DB-Dump either via console or export in phpMyAdmin, create a new table and import the dump again. Then either copy the ProcessWire installation and edit the credentials in site/config.php to match the new db name/user/password, or do the same on the live-site. Maybe it fixes your problem? Cheers Link to comment Share on other sites More sharing options...
sambadave Posted November 14, 2015 Author Share Posted November 14, 2015 Hi Wanze, thanks for the tips. I updated to 2.6.1 and I'm not receiving the error you quoted any more thankfully. I also tried your other tips but with no luck. I'm a bit closer to a solution though. Although editing existing pages was completely fine I was having a lot of bother creating new pages, new fields, new modules etc. After a bit of googling I was able to set auto increment for primary key in those tables which has fixed a lot of the issues as far as I'm aware. For some reason though I still can't create new templates. I'm getting the following error after trying to add a new template in PW: Session: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY' I assumed like the others that this was coming from the templates table so I've set "id" to auto_increment. It doesn't fix my problem though and I'm out of ideas now. It feels like I've definitely made a mistake somewhere along the way when exporting / importing databases so I've only myself to blame here. I'm still learning this side of things. Link to comment Share on other sites More sharing options...
sambadave Posted November 14, 2015 Author Share Posted November 14, 2015 Update: Adding templates fixed by adding auto_increment to id in "fieldgroups" table. 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