Jump to content

404 error after custom site profile import


Recommended Posts


I exported a profile of a running live site (PW 2.5.2) with ProcessExportProfile module.

Then cloned latest stable branch 2.5.3 to my local vagrant box dev server, copied the exported profile folder into PW root and installed.

Everything went smoothly so far. All my templates, fields, modules and template files are there.

I can access all but one specific page of my site. That page always throws a 404 error.

The page sits under /profile and has template userprofile assigned. It is published and not hidden. The template file site/templates/userprofile.php is there.

Only difference to the working pages is that this /profile page requires login before it can be accessed.

After successful login the user is redirected to the /profile page with

if($user->isLoggedin()) $session->redirect($pages->get('/profile')->url); 

But also if I enter the URL path manually, I get the 404 error.

On the live site /profile only throws a 404 if you enter the URL path manually and are not logged in.

So on my local install the /profile page acts as if the user was not logged in even if the user is logged in.

I checked that the user really is logged in with

if($user->isLoggedin()) echo "LOGGEDIN";

and has the correct roles with 

if($user->isLoggedin()) echo $user->roles; 

I haven't made any changes to my userprofile.php or any other files in the fresh install. And the code in there is working perfectly fine on the live site and on a copy of the live site that runs in the same dev environment as the site I'm having problems with. 

Now I'm really lost and don't know which steps to take for debugging this (debug is set to true in config.php - no messages or errors).

Any help would be greatly appreciated.

EDIT: I also installed the site on a different non local server to be able to rule out server environment issues. But same behaviour. Still get 404 for profile site

Link to comment
Share on other sites


It was a role/permission issue.

ProcessExportProfile didn't export the permissions correctly for a custom role in my system that got assigned a custom permission.

After reassigning those, I can finally access the page.

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

  • Create New...