Error logging in as admin after V9.01 upgrade from 8.5.7

Hi there - Getting this error logging into my Concrete site (as admin) after upgrading to V9.01:

TypeError thrown with message “Return value of Concrete\Core\Navigation\Item\PageItem::getPageID() must be of the type int, null returned”

Last item in the Stacktrace:
#51 TypeError in /home/ifiv5be6/public_html/updates/concrete-cms-9.0.1/concrete/src/Navigation/Item/PageItem.php:43

Note: I am able to login as an Administrator Group user without any problems and the site appears to working OK.

I ran the Upgrade from version 8.5.7 logged in as admin with no errors reported.
Has anyone encountered this problem ?


Perhaps you had an addon installed in your 8.5.7 version to redirect users and the admin user login redirect is broken in version 9.01 (longshot I know!)

Thanks for your suggestion. You reminded me to attack this sort of problem by first removing old addons that (now) may not be compatible with V9. I’ll try that in my test site and see how things go.

Excellent, let us know how you get on.

Hi there,
Still no luck - getting same error even after (in V8.5.7 logged in as admin) uninstalling all Addons in my test site and deleting all pages (and then deleting all the pages from Trash) - which left me with a simple home page to upgrade to 9.0.1. As before I can login as an Administrator user. This website (I believe) was originally created in version 8.2.1 (circa 2017) and added to and redeveloped in various versions since then - all upgrades working successfully to 8.5.4 and briefly to 8.5.7. Any ideas what happens differently when admin logs in as opposed to an Administrator user ?
Thanks - Jeff

I can only think that in version 8.5.7 you had selected a custom destination from the ‘Login Redirect’ page and for some obscure reason during the upgrade the Collection ID (cID) was changed?

Thanks for your reply.
In our “cut down” 8.5.7 site (No Addons and just a home page and logged in as admin), when I view the Sitemap with “Include System pages in Sitemap” turned on, I can see the following pages: 1) Login ; 2) Register ; 3) Page Forbidden & 4) Page Not Found - we don’t seem to have a Login Redirect page as such. None of these appear to have any custom destination. If the cID was changed during the upgrade on any of these or other system pages, would we be able to see that in the PageSearchIndex (or some other table) in a before / after upgrade comparison ?
Regards, Jeff.

Hi There,
I tried something else. I had a copy of our website (as at version 8.5.5 with all our Addons & pages) on my local Windows 10 PC running under Xampp. I successfully upgraded it to 8.5.7 and then attempted to upgrade to V9.01 (logged in as admin) - and it worked. Any thoughts on that ? I am beginning to think of an incorrect DB table name somewhere as under Windows these are all lower case - whereas on our hosted environments the MySQL table names have have correct mixed case names. Is there a master list of core Concrete5 table names somewhere to check ?

In your XAMPP MySQL my.ini file just beneath the [mysqld] you need to add a line like this:
lower_case_table_names = 2
Restart XAMPP and then when you install concrete your table names will be correct mixed case.

This addon may be of help - not v9 ready yet, so you will need to apply it at 8.5.7 before the upgrade.

Thanks for both your replies.
Have tried migrating our current site to my local Xampp environment (with lower case table names AND mixed case) but unable to login as admin after the upgrade to 9.01. Also, I did some comparisons of the PageSearchIndex table contents (before and after the v9.0.1 upgrade) of our cut down site with no addons and all pages deleted except a home page - and could not see any changes to any cID values.

Is there any debug logging that could be turned on to record what happens when admin (as opposed to any other user) logs in ? I assume any SQL failures would be reported.



I would happily spin this up on my dev. server if I can get zipped copies of the files and database.

Thanks very much.
I can put the files & db import into my DropBox and send the link via private email if that is OK.



Yes Jeff that will be just fine.

I have sent you a private message regarding the dropbox link.

For any other members facing the same error messages it was necessary to modify two Core files in version 9.0.1.
The line of code in each file that had to be commented out was
$this->removeUnrelatedSectionsFromNavigation($navigation->getItems(), $this->getSectionIDs());
to be like this
// $this->removeUnrelatedSectionsFromNavigation($navigation->getItems(), $this->getSectionIDs()); (commented out)

The file concrete/src/Navigation/Modifier/AppendHTMLModifier.php was preventing admin from logging in?

The file concrete/src/Navigation/Modifier/OpenToCurrentPageModifier.php was preventing the ‘Reset Clipboard and Edit Mode’ from the System & Settings > Basics section from working.

In each case the error message was the same as the one posted in the first post of this thread.
“Return value of Concrete\Core\Navigation\Item\PageItem::getPageID() must be of the type int, null returned”

Update: I eventually traced the cause to an “orphan” record in the Pages table - left by a Phpcodeblock add-on that was uninstalled a year or two ago (after it triggered fatal security alerts with our website host when php code was altered). As soon as the SQL DB record was removed I was able to revert the core code changes described above and login as admin with no errors.

Thanks for assistance received with this issue.