Jump to content

After upgrade to 3.0.123 Pages aren't displayed correctly


joe72joe
 Share

Recommended Posts

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

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.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

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

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 by flydev
errors hint / doc
  • Thanks 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...