Change WordPress user roles and capabilities › Forums › Bug Reports › Unable to Import Roles
- This topic has 6 replies, 2 voices, and was last updated 6 years, 1 month ago by Vladimir. 
- 
		AuthorPosts
- 
		
			
				
06/09/2019 at 01:17 #5912robfromerd ParticipantIntermittently unable to import roles. The URE admin page reloads and no success or error message appears. Sometimes if I switch between Chrome and Safari I can get one to successfully import. (Also have to rename the .dat file from .dat.pdf to .dat when exporting from Safari) 06/09/2019 at 01:29 #5913robfromerd ParticipantAdditional information — the role that does not import is one that I based on another one — when i create a new role from scratch and then export it — that one does import. 06/09/2019 at 14:51 #5915Vladimir KeymasterSend to support [at-sign] role-editor.com exported file of a role which you can not import. I will investigate what’s going wrong. 06/09/2019 at 18:00 #5916robfromerd ParticipantHi Vlad 
 Updated my local version to latest — which allows more functionality but not consistent display of the success message or success with the file that I sent.07/09/2019 at 05:50 #5917Vladimir KeymasterHi Robert, Import process stops on the step of decoding data back to JSON. It fails due some incorrect (for JSON) characters inside. 
 So I need to investigate and fix 2 things:
 1) why error message is not shown;
 2) what’s happening with JSON formatted data.For item 2) I need raw roles data from the database. Can you send me exported record from wp_options table? 
 You can extract needed record with this command:SELECT * FROM wp_options WHERE option_name='wp_user_roles';‘wp_’ is your db prefix in table name and in option name value, so if it’s not equal to ‘wp_’ replace ‘wp_’ to your own db prefix value from wp-config.php file. 09/09/2019 at 19:10 #5926robfromerd ParticipantI am pretty sure this failure to import occurs when I base a new role on an existing one. Ones created from scratch can be imported but this is a pain as I have a long series of roles that are similar except they are restricted to different site sections via post id in Posts Edit dialog. 10/09/2019 at 13:09 #5928Vladimir KeymasterI tested with another roles data (21 roles) you provided. I can not reproduce the issue with import exported role. I tried create a role as a copy of another one and export/import it. No problem. Technically new role from scratch and role as copy of another role are created the same way both. New role created just as a copy of subscriber role. Definitely, a reason of the issue is somewhere else. Is it possible to get access to your site stage copy with admin access to reproduce/investigate the issue? 
- 
		AuthorPosts
- You must be logged in to reply to this topic.
