Jump to content

Users Page Error


Macrura
 Share

Recommended Posts

I have a processwire dev site, running 2.4.8, and I can no longer access users...When i go to access users, i get this error, and no users displayed:

Unknown Selector operator: '' -- was your selector value properly escaped?

with debug turned on

 TemplateFile: Unknown Selector operator: '' -- was your selector value properly escaped?
 field='roles', value='', selector: 'roles'

(and another ~70 rows of errors..)

Spent a few hours looking at the database and comparing it with another PW database to see if there is something amiss, but can't seem to track down this problem;

the problem may have started after attempting to import some pages with page migrator- i'm thinking that something setting or part of the database got corrupted...?

TIA

Link to comment
Share on other sites

the problem may have started after attempting to import some pages with page migrator- i'm thinking that something setting or part of the database got corrupted...?

That's not what I want to hear :)

Are you using the latest version of Migrator?

Can you send through that entire error message (all 70 rows of it)?

What happens if you go back to PW 2.4 - wondering if there is a difference without Lister being used to display users.

Link to comment
Share on other sites

Could be. It is working fine for me with the latest dev - just checked. Try emptying the users from the db and see if the problems persists. What is your users/roles/permissions set-up?

Link to comment
Share on other sites

@Adrian - thanks for checking in on this!  i'm sure it was my fault, doing something wrong with migrator, (and i do have a backup but haven't reverted yet)... Also, this site was upgraded a few times, probably set it up about a year ago.. But i am using the latest migrator, i just installed it a few days ago to try this migration of client pages...

What happened with migrator is that the pages i was importing had a select field for users, and then I didn't know migrator would try and import those attached user pages; but the migrator put the users in funny places, like right under admin, but not in the users area under the users page; so i had to manually delete them from the DB, tried deleting those users with the api but it wouldn't let me; so ultimately i cleaned out all of the pages, fields and templates that migrator imported, and i deleted all the users from the database that migrator imported...

should i PM you the full debug error?

@arjen - i only have 1 user now, who is me, the superadmin... i only have the default roles and permissions at the moment; maybe i need to check over the tables for roles though...

Link to comment
Share on other sites

I doubt it's your fault. Behaviour of copying pagefield content is actually something I am struggling with for Migrator (and the main reason I haven't "released" it yet). The current behaviour is to automatically create the required templates and pages for any page field that is part of a page that you chose to migrate. The problem is where to put these page field pages. If they are not within the page tree that you are migrating, or if the parent they are under is not available on the destination site - what to do? I think the desired behaviour may be different depending on whether you are migrating content from a dev version to a live version of the same site, or whether you are importing content from one site into another one that doesn't already have the page field content in its structure.

I hope that makes sense - even I am having trouble understanding what I just wrote :)

but the migrator put the users in funny places, like right under admin, but not in the users area under the users page

That definitely sounds like the issue. It's not the importing of users/roles that created the content (Migrator handles this well), but rather the problem of trying to re-create the users that are selected in that select page field.

I'll obviously have to revisit my current approach to migrating page field content, especially for scenarios like this. The problem is that if the page field pages are not under the exported parent and you don't include them, then that will result in broken page fields on the destination site.

What to do :) ?

I'll marinate on this for a bit, but I'd also really appreciate any thoughts!

Macrura - if you feel like testing, I'd really appreciate knowing if everything works fine if you remove that page field from the site before you export. It should work fine with other page fields, but the linking to users must be the issue.

Thanks and sorry for the hassles!

EDIT: Would you mind PM'ing your exported json file so I can see exactly the structure of the page field?

I am thinking that maybe an option would be for the export to contain the full page path to the pagefield's content pages and if that path exists on the destination PW site then use that. If not, then create these pages under the Home page. Hopefully this can be solved in a logical way that works in all situations.

  • Like 1
Link to comment
Share on other sites

@adrian - many thanks; i have the migrator installed on a localhost and that's where i generated the export; then i tried to import to a site running on a private intranet...

right now my main thing is to try and first fix the users list.. i might try installing my backup and see if users works, in which case it would be likely that the cause of the current issue is something to do with the migrator...

but i should have time next week to help out and do some testing... right now i'm lack of sleep and too many projects, too many deadlines!

Link to comment
Share on other sites

Good luck with restoring things and with all the deadlines and please let me know when you have a chance to check the Migrator version and send me that JSON file so I can test and sort out a better solution for page fields that handles all situations.

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