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 4
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

×
×
  • Create New...