"The cache directory must be published under the webroot" error when importing database into Concrete 9.2.1

Hello,

I am trying to update an installation of Concrete from 8.2.1 to 9.2.1. The new version will be on a different server that supports a higher PHP version, so what I have tried to do is:

  1. Install fresh version of Concrete 9.2.1
  2. Export the database of the old site via PHPMyAdmin
  3. Import that database into PHPMyAdmin of new site
  4. Change database.php to reflect the appropriate database info

I am receiving the error:

“The cache directory must be published under the webroot (or you can set the concrete.cache.directory_relative configuration option)”

Is this due to a conflict between PHP versions? I’d really like to figure out a way to at least get a skeleton of the site copied over to avoid having to manually rebuild the pages. The theme files are the same.

In case anyone else runs into this problem, I turned off all caching before exporting the database. That fixed this error. Then I got a new error about canonicals – so I turned them ON in my local installation before importing the database, and that fixed that error. Now I have SQL errors that I am attempting to research.

Question: What is the recommended upgrade path? I.e. should I update to a different 8.x.x before 9.2.1?

Upgrade to the latest 8.5.xx, then to the latest 9.2.xx.

1 Like

Thank you! I have installed 8.5.14 with my theme. After importing my database, I am still receiving a lot of invalid field name exceptions:

Doctrine\DBAL\Exception\InvalidFieldNameException thrown with message "An exception occurred while executing 'select Pages.cID, Pages.pkgID, Pages.siteTreeID, Pages.cPointerID, Pages.cPointerExternalLink, Pages.cIsDraft, Pages.cIsActive, Pages.cIsSystemPage, Pages.cPointerExternalLinkNewWindow, Pages.cFilename, Pages.ptID, Collections.cDateAdded, Pages.cDisplayOrder, Collections.cDateModified, cInheritPermissionsFromCID, cInheritPermissionsFrom, cOverrideTemplatePermissions, cCheckedOutUID, cIsTemplate, uID, cPath, cParentID, cChildren, cCacheFullPageContent, cCacheFullPageContentOverrideLifetime, cCacheFullPageContentLifetimeCustom from Pages inner join Collections on Pages.cID = Collections.cID left join PagePaths on (Pages.cID = PagePaths.cID and PagePaths.ppIsCanonical = 1) where Pages.cID = ?' with params [1]:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Pages.cIsDraft' in 'field list'"

The only other place I’m seeing a similar error mentioned is here:

And it looks like your suggestion was to do the intermediate update. Any ideas what else I could try?

From the process you describe, I would not expect that to work.

The process would normally be to update first. Importing an old version database into a new version code will likely have inconsistencies in the configuration. You may be lucky and get round that by using the CLI update command with the --rerun option, but there is a chance that could miss critical migrations. Its a bit of a long shot.

If not, go back to your 8.2.1 site, database and files, and update from within that site or manually from the CLI there.

1 Like

In the 8.2.1 version, the Update page reads that there are “No updates are ready to be installed.” I have read elsewhere that this may be some kind of bug. Should I be able to upgrade to 8.5.14 using the “Replacing the original Concrete Directory (Version 8 and above)” method listed on the documentation page you linked to? Thanks again.

Yes,

  1. Somewhere safe extract /concrete from the new distribution .zip for 8.5.14
  2. In the site, rename /concrete to /concrete_old
  3. copy your new /concrete into the site
  4. run the update through the CLI.

While doing this, follow all the other instructions about safe updates: keep backups, put the site in maintenance mode, put the database entities in development mode, disable the cache.

1 Like

Thank you! I have successfully upgraded to 8.5.14. :grin:

I am ready to attempt a path to the newest version of 9. Would you mind answering a couple more questions? I really appreciate your time.

  1. Should I attempt the same process with switching out the /concrete folder from the 9.x.x distribution?
  2. My addons do not have version 9 compatibility – should I uninstall them first?

I am doing all of this on a local Wampserver installation for now, so I can afford to muck things up and redo, luckily. I’m learning a lot, at least!

Yes, exactly the same process

Anything not v9 compatible, either uninstall first, or work on the code to make it compatible.

Take care over v8->v9 update compatibility. Some addons have dedicated v9 versions and no upgrade of an actually installed addon from v8 to v9. If in doubt, contact the respective developer.

1 Like