joe72joe Posted January 3, 2019 Share Posted January 3, 2019 Good evening together, wish everyone a happy new year. I have a problem after updating to the latest version (from 3.0.116 to 3.0.123) I can log in, everything works. In the frontend, the start page is displayed, but as soon as I want to click on a subpage, only parts of the page will be displayed (In the frontend, a message will be displayed at the bottom of each subpage.) -> Internal Server Error The server encountered an internal error or misconfiguration and was not to complete your request. " The following error message appears in the backend under "Logs": Error: Exception: Selector must be string, array or Selectors object (in /homepages...../wire/core/PageTraversal.php line 410) This is very strange because before the upgrade to 3.0.123 everything in the frontend everything was shown (without error message). Although I have created backups with Duplicator, i'm afraid to delete everything on the server right now including the database to reinstall. My PHP knowledge are very rudimentary. Maybe someone in the forum knows this error message. Or should I better delete everything and reinstall the Duplicator package in the hope that this works Many thanks in advance. Link to comment Share on other sites More sharing options...
wbmnfktr Posted January 3, 2019 Share Posted January 3, 2019 Just guesses and thoughts but... Do you use one of the ProcessWire site profiles or did you build something on your own? Which modules do you use? Did you place custom files within the /wire folder or changed files in there? Did you change the original /index.php or /.htaccess files? Most of the time something like that happens to one of my sites I walk this way... 1. Turn on debug mode /site/config.php <?php //... $config->debug = true; Maybe this already helps or shows more details about that error. 2. Refresh modules & clear compiled module files http://yourdomain.tld/processwire/module/ a) top right corner b) bottom left corner on Site tab 3. Delete other caches ProCache, Template Cache, Markup Cache, whatever server/pw-side cache. 4. Looking into your page template Investigate your code that should have been displayed where the error message starts. Maybe... there is something. 1 1 Link to comment Share on other sites More sharing options...
joe72joe Posted January 3, 2019 Author Share Posted January 3, 2019 Hello @wbmnfktr, thanks for your quick reply .. Quote Do you use one of the ProcessWire site profiles or did you build something on your own? I build up an Template of my own Quote Did you place custom files within the /wire folder or changed files in there? Did you change the original /index.php or /.htaccess files? no, i didn't After looking again in the Error-Logs there I saw this message: .../wire/core/Page.php(2458): ProcessWire\PageTraversal->prev(Object(ProcessWire\Page), NULL) for there in the past I had this Code-Snippet in the Bottom of one of my Template-Files: <div class="container"> <div class="col-sm-12"> <nav> <ul class="pager"> <?php $portfolio_pages = $pages->get->projects; ?> <li class="previous"> <a href="<?php echo $page->prev($portfolio_pages)->url; ?>" class="text-muted"><span aria-hidden="true"></span><i class="fa fa-angle-left"></i> Vorheriges Projekt</a></li> <?php $portfolio_pages = $pages->get->projects; ?> <li class="next"> <a href="<?php echo $page->next($portfolio_pages)->url; ?>" class="text-muted">nächstes Projekt<span aria-hidden="true"></span><i class="fa fa-angle-right"></i></a></li> </ul> </nav> </div> </div> After deleting this Snippet it works now again .. !!?? Not understandable to me, because this code has worked in the past. I'll leave it without this snippet for now. Apparently the code is not completely clean or it causes problems. thank you again Link to comment Share on other sites More sharing options...
gmclelland Posted January 3, 2019 Share Posted January 3, 2019 $pages->get->projects; That looks strange to me. Maybe you can look at the examples on https://processwire.com/api/variables/pages/ ? I'm not sure why it worked before? 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted January 3, 2019 Share Posted January 3, 2019 <?php // ... $portfolio_pages = $pages->get->projects; Looks suspicious to me. What's that ->projects part? Link to comment Share on other sites More sharing options...
joe72joe Posted January 3, 2019 Author Share Posted January 3, 2019 hmmm ... the "projects" stands for a variable, but I'm not sure anymore ... I had the code from the forum and modified it: https://processwire.com/talk/topic/12147-continuous-prevnext-links/ .. and it worked ... but I have to look at this again in peace, there seems to be a lot confusion in the code and with me ... Link to comment Share on other sites More sharing options...
gmclelland Posted January 3, 2019 Share Posted January 3, 2019 Perhaps it should be: $portfolio_pages = $pages->get('/portfolio/')->projects; 1 Link to comment Share on other sites More sharing options...
joe72joe Posted January 3, 2019 Author Share Posted January 3, 2019 @gmclelland unfortunately that does not work, I have the error messages again ... I think I will omit this part ... After the first shock I'm glad that the site is running again ... I will report if I can do it with the pagination thanks Link to comment Share on other sites More sharing options...
gmclelland Posted January 3, 2019 Share Posted January 3, 2019 Do you have a "Portfolio" page with "Project" pages below it? What does you setup look like? Maybe you describe what your template is trying to do? Link to comment Share on other sites More sharing options...
joe72joe Posted January 4, 2019 Author Share Posted January 4, 2019 In fact it is a portfolio Site, you are right ... i made a sketch of what my sites approach is ... Link to comment Share on other sites More sharing options...
flydev Posted January 4, 2019 Share Posted January 4, 2019 (edited) 11 hours ago, joe72joe said: Not understandable to me, because this code has worked in the past. Maybe not in the right way and it might be related to this issue (fixed) about API method next() and prev(). https://github.com/processwire/processwire-issues/issues/716 https://github.com/processwire/processwire/commit/8e22bee1b561045fde4d2f7a11479ac5f24c18e2 I think that in order to get the things working back, you must install TracyDebugger, set `$config->debug` to true, load the culprit page and past here the full Exception Stack Trace. Edit: Look like your errors are here : 11 hours ago, joe72joe said: <?php $portfolio_pages = $pages->get->projects; ?> <?php echo $page->prev($portfolio_pages)->url; ?> <?php echo $page->next($portfolio_pages)->url; ?> The two method expect a SELECTOR string, not a PAGE Object. https://processwire.com/api/ref/page/next Edited January 4, 2019 by flydev errors hint / doc 1 Link to comment Share on other sites More sharing options...
joe72joe Posted January 6, 2019 Author Share Posted January 6, 2019 @flydevthanks for the hint. I have to read that in peace and try to understand that. As a non-coder not so easy :-) 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