jeng Posted September 12, 2013 Share Posted September 12, 2013 I've gotten an error when creating a field: "Unknown Selector operator: '' -- was your selector value properly escaped?" Not a big deal, I know what went wrong, but now I can't actually edit the field any more. Every time I click on the field in the table of fields, the error shows up with no way of actually correcting it. Anyone experience this before and have a work around? I'm not even sure how I could just delete the field and create a new one, as a template that has the field also shows the error. Link to comment Share on other sites More sharing options...
adrian Posted September 12, 2013 Share Posted September 12, 2013 I am not sure about that error in the context of field creation - perhaps you can share what went wrong. Generally not good practice as it can get you in trouble if you don't know what you are doing, but you may need to fire up PHPMyAdmin and delete the "field_fieldname" table and also the relevant row from the "fields" table. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted September 12, 2013 Share Posted September 12, 2013 And if already in a template: Write the ID of the field on paper / txt and remove it from: fieldgroups_field 1 Link to comment Share on other sites More sharing options...
ryan Posted September 14, 2013 Share Posted September 14, 2013 I'd be curious to know how you created the non-working field, just so that we can prevent that from happening in the first place? Link to comment Share on other sites More sharing options...
lenoir Posted May 13, 2014 Share Posted May 13, 2014 I've encountered something similar with a page field: can't access it anymore, i'm getting the following error message: Recoverable Fatal Error: Argument 1 passed to InputfieldPage::___findPagesCode() must be an instance of Page, none given (…) I wish i could simply correct the field or at least delete it, but i can't access it at all. I'm a bit reluctant to get into phpmyadmin to delete it, but I don't really want to leave a trouble field in the field list. Any way to delete a field with php? Link to comment Share on other sites More sharing options...
adrian Posted May 13, 2014 Share Posted May 13, 2014 Depending on just how corrupted things are, this should remove the field from all templates and then delete the field: $field_name = "myfieldname"; foreach($templates as $template){ foreach($template->fieldgroup as $field){ if($field->name == $field_name){ $template->fieldgroup->remove($field); $template->fieldgroup->save(); break 2; } } } $fields->delete($field); The first chunk of code is stolen from Soma. I just added the bit at the end to delete the actual field as well. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now