alxndre Posted May 3, 2016 Share Posted May 3, 2016 Hi, I'm having a weird problem and I don't know how to fix it. We've built a large-ish system and it has been running alright for almost a month now, no problems. Then today, I had to check an area that we haven't paid much attention to. It's a collection of pages that hold the details of certain transactions. Now when I try to edit the page, it tries to load for a long time, may a minute, and then throws a 500 error. The template only has 3 fields, so I can't figure out what could possibly be causing the error. The template works when used within the templates or when searched. It's just that opening/editing them in the admin throws the error. Has anyone else encountered this? What could possibly cause a page of a certain template to not load? All the other pages open normally. Any help is, as always, greatly appreciated. Thanks. Link to comment Share on other sites More sharing options...
tpr Posted May 3, 2016 Share Posted May 3, 2016 First check the server error logs, hopefully there is something about the hiccup. Link to comment Share on other sites More sharing options...
alxndre Posted May 3, 2016 Author Share Posted May 3, 2016 Hi, tpr. Thanks for the reply. I checked the logs in both the ProcessWire admin (Setup>Logs) and server logs (php-fpm logs, nginx logs) and nothing seems to indicate possible causes. I noticed that these pages' titles are blank. Could that cause this error? Thanks! Link to comment Share on other sites More sharing options...
tpr Posted May 3, 2016 Share Posted May 3, 2016 I noticed that these pages' titles are blank. Could that cause this error? No that shouldn't I guess, sometimes I also happen to create pages with no title. Link to comment Share on other sites More sharing options...
Peter Knight Posted May 3, 2016 Share Posted May 3, 2016 Can you remove each field one at a time and test the edit ability at each step? 2 Link to comment Share on other sites More sharing options...
alxndre Posted May 3, 2016 Author Share Posted May 3, 2016 No that shouldn't I guess, sometimes I also happen to create pages with no title. I confirmed that it isn't the cause. I populated the titles, and it's still the same. Can you remove each field one at a time and test the edit ability at each step? I will try this later tonight when the system is not in use and after a backup. Thanks. Link to comment Share on other sites More sharing options...
alxndre Posted May 3, 2016 Author Share Posted May 3, 2016 Can you remove each field one at a time and test the edit ability at each step? Thanks, Peter. I just tried doing this and found the cause of the problem. The transactionreference field causes the server to timeout because it is a page field that has >5000 possible pages to be selected. I'm guessing this happens while the pageedit process is trying to populate the select input for the field. What's the best input choice/setting for something like this? Thanks again. 1 Link to comment Share on other sites More sharing options...
3fingers Posted May 3, 2016 Share Posted May 3, 2016 You could try to use the new ajax-driven inputs (more on that here). Basically you can tell Processwire to delay loading of some specific inputs (or groups of inputs) until they are opened/selected. Worth a try in your case. Let me know 4 Link to comment Share on other sites More sharing options...
arjen Posted May 3, 2016 Share Posted May 3, 2016 Also try Autocomplete which only fetches the populated pages instead of the whole list. This speeds things up too. 3 Link to comment Share on other sites More sharing options...
alxndre Posted May 4, 2016 Author Share Posted May 4, 2016 Thanks guys! Got it fixed. 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