Jump to content

Can't publish user: Saved Page: /admin/access/users/test/ - Cannot be published until errors are corrected


Jozsef
 Share

Recommended Posts

This is a strange behaviour I'm getting, tried with v2.5.3 and now with v2.5.22.
I create a user, enter all the details including correct password, click on publish and I'm getting this error message:
Saved Page: /admin/access/users/test/ - Cannot be published until errors are corrected

I tried to delete the user and recreate it, create a different user name, no luck.

I' can't figure out what is wrong as this is supposed to be a pretty simple task to do and there's no topic on this error.

Edit: This user "test" was working before but now is unpublished

Could someone please direct me to the right direction? Thanks

Link to comment
Share on other sites

I have seen that error when fieldtype doesn't match input or a required field is empty, but it generally informs me what field was the problem (with a big old red notice on top of the field too). So that's weird that you're not getting any description of the problem.

If you haven't added any of your own fields to the user template and have checked/double-checked the input of every form, here is what I would do :

1. turn on debug in /site/config.php and see if it gives any extra information

2. If that fails, search the code to see where it outputs that error. (Only one place: https://github.com/ryancramerdesign/ProcessWire/blob/676458407bd530b69b50c6ef2f44cf16e4ef4449/wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module#L211) Based on that it's safe to assume you have some formErrors. Look a few lines before that (L195), I would temporarily change

$formErrors = 0;
foreach($this->notices as $notice) {
    if($notice instanceof NoticeError) $formErrors++;
}
to
$formErrors = 0;
foreach($this->notices as $notice) {
    if($notice instanceof NoticeError) {
        $this->error('Notice: '.$notice);
        $formErrors++;
    }
}
That might give you a clue about the notice that is causing a formError. Once you get that info (or even if you don't), you should undo the changes you made to the module file. Anyway it's a hack, but it's how I sometimes investigate what is happening...
  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Thanks for everyone for the responses, I couldn't check back in the meantime.
 

As a workaround I got around the problem by creating the user in the API and it worked like a charm.

Deleting/recreating the user  in the backend didn't help, even when using a different username.

The strange thing is that there are not that many fields on the standard user form so I could hardly miss anything.

There were no other error messages on the top of the page or in the error log, just simply didn't work.

If I have time I'll get back to it to further investigate using the suggestions.

Sorry to abandon the topic, I haven't got any notifications and I had to rush to meet the deadline...

Thank you all for the help, I really appreciate it and will come back with my findings.

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.

  • Similar Content

    • By Clarity
      Hello everyone!
      I'm new here and I want to set an user avatar to my profile. However, I don't see any option in my personal cabinet that can do it. Could you please tell me if there are there some requirements for user for setting an avatar or I'm missing something?
    • By theoretic
      Hi there! And thanks for Processwire!
      I've got an interesting case concerning access to current user page. It appears that PW somehow limits access to the frontend page of current user.
      I'm speaking about a specific PW configuration. We have two kind of users: 'regular' users with native user template and member users with specific member template and specific members parent page (by the way, it's so cool that PW allows to use custom user templates and custom parent for certain user pages!). So a member with name Joe has a page with member template and url like /members/joe .
      The members template has some access limitations: only member users can see pages with member template. It works like a charm in most situations. For example, user Bill (who has member template and is logged in) can browse a page with url /members/ann which also is a member page with member template.
      And now, meet the glitch! The above-mentioned Bill cannot get to his own page /members/bill ! PW generates 404 page instead.
      I see no reason for this behavior. From my point of view any member should have access to any member page in this situation. What am i doing wrong? Any advice is welcome!
    • By VeiJari
      Hello,
      I'm trying to create a page via api and populate values to it. I can populate everything except user pages to a page reference array.
      Code: 
      $dataUsers = $data->project->users; foreach($dataUsers as $dataUser) { $newProject->projectUsers->add(wire()->pages->find('template=user, id=' . $dataUser->id)); } I'm receiving my data via JSON.
      Is there something I'm missing?
      Thanks for help
    • By neonwired
      I'm hoping someone has seen this before. There doesn't appear to be an issue with the user info.

       

    • By prestoav
      Hi there,
      I have a marketplace site that used the older Fredi module for front end editing so advertisers can create and edit their adverts (in the form of pages). After upgrading to v3.0 of Processwire I'd like to change the editing method for users to the new, core front end editing methods. However, it seems that with this method any editor can edit any page (subject to template restrictions for their user role). Using Fredi I checked the user and created user were equal before displaying edit buttons (clunky but it worked).
      Is there any stock way to restrict front end editing to the creator of the page so that my advertisers can only edit their own ads or should I test for user as before?
      Thanks in advance as always 🙂
×
×
  • Create New...