Jump to content
gebeer

404 error after custom site profile import

Recommended Posts

Hello,

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

Share this post


Link to post
Share on other sites

SOLVED

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.

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Rodd
      Hi everyone!
      I have a website in a production environment and I want to duplicate it in a local environment. I exported the content of the website (with the 'Site Profile Exporter' module) but I cannot use it actually. I've got an issue with the database. I imported this one in MAMP then.

      I also exported the pages (with the 'ProcessPagesExportImport' module), but I cannot import it to my local website because the fields don't exist. So I created this fields, but I have this error :
      How can I use the elements that already exist and are presents in my database? How can I duplicate correctly the templates, fields and pages?
      Thanks by advance
      PS: Sorry if my english is bad
       
    • By hellerdruck
      Hi all
      I need help with something. Situation: We have let's say 2'000 Files (Excel) that should be displayed (list with links) on a page. We'd need to filter these files by given Keywords or a tree structure or both. Now, I'm looking for a solution whereas our customer can synchronise the files from his local computer with the folder on the webserver. They will update and upload files on a daily basis. Therefore, it would need to synchronise rather than load the files manually in pages or repeaters. Maybe indexing would be an idea, too.
      Are there any modules for Processwire that would help achieving this? Could anyone point me in the right direction?
      Thanks in advance.
    • By Peter Knight
      Hi guys
      is there a checklist of items I should consider for diagnosing a series of pages which display a 404 error?
      Basically I have built a Blog and all my posts are under a folder called 'Posts'. Some of these pages successfully display while others display a 404 page. 
      This is what I have confirmed so far...
      1. All pages are within the same root folder 'Posts'
      2. All pages have the same template and fields completed
      3. All pages have the same properties under Settings > Who can access this page
      4. Pages have no redirects in place
      5. Pages have no special characters or anything funky in the URL slug
      There are no errors showing in the log either so I am stuck 😕
      Thanks
    • By iNoize
      Hello, need some help for an RealEstate project. It have to use the OnOffice to import the objects. 
      https://apidoc.onoffice.de/
       
    • By flydev 👊🏻
      Bootstrap-4 Minimal site profile for ProcessWire
      This profile is based on the "minimal site profile (intermediate edition)" and bundled with Boostrap v4.4.1
       
        Features
      Bootstrap SASS Font-Awesome SASS Render / helper functions for : Simple ul navigation Bootstrap Multi-level navbar Bootstrap Carousel Bootstrap Cards Bootstrap Jumbotron Boostrap Accordion Assets minification, files bundle   Dependencies
      jQuery Popper.js Bootstrap FontAwesome   Prequisites
       You'll want to install the following on your system before proceeding:
      Yarn / NPM How To Install
      Download the zip file at Github or clone directly the repo with git clone and skip the step 2. Extract the folder site-pwbs4-master into a fresh ProcessWire installation root folder. During the installation of ProcessWire, choose the profile "ProcessWire Bootstrap 4 profile".   After installation
      You can find the development file (CSS/SCSS/JS) in site/assets/dev/src
      The profile can be used as is only with $config->debug set to false. To use it in debug mode, you are required to install the dependencies with the package manager.
      Open a terminal in site/assets/dev and execute the following command-line: yarn Available commands :
      Rebuild, minify and bundle assets for release : yarn build   References
      Bootstrap v4 documentation ProcessWire documentation ProcessWire Forum: bootstrap tag ProcessWire Forum: bootstrap related posts   Credits
      The ProcessWire staff Inspiration from @gebeer and his Bootstrap 3 profile post Members who contributed in various post about Bootstrap navigation and code (see code-source for refs). Screenshots

×
×
  • Create New...