Skip Navigation

[Resolved] "Cheating" error when attempting to edit a taxonomy

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 5.02 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#601133

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I'm currently having a look and reading the thread to get up to speed.

Thanks,
Shane

#601137

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nada,

Could you try the fix here ?
https://wordpress.stackexchange.com/questions/215331/how-do-i-fix-you-are-not-allowed-to-edit-this-item-for-admins-on-existing-pos

Please try and let me know if it helps.

Thanks,
Shane

#601157

Just tried it – replaced the original code with the suggested code, it doesn't make a difference. Same error message.

#601173

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Could you let me know the last thing that was done to the site before this issue was noticed? Also if possible can I get FTP for this test site.

Thanks,
Shane

#601178

It's impossible to know what was done to the site prior to us noticing this issue. The site is very active with thousands of users.
In order to give you FTP access I would need to send you a Flywheel collaborator invite - can you please send me your email address for that purpose?

#601182

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nadav,

My Email is shane.c@onthegosystems.com

#601188

I sent you an invite to collaborate on Flywheel. Once you’re up and running there, read here for FTP access:
hidden link

#601200

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Nadav,

I was able to login through sftp however I tried to edit a file but it wouldn't upload due to permissions.

Could you edit the post.php file in the wp-includes folder.

This line

if ( ! current_user_can( 'edit_post', $post_id ) )
		wp_die( __( 'Sorry, you are not allowed to edit this item.' ) );

Could you comment out the die function and let me know what happens.

Thanks,
Shane

#601771

Hi Shane, the if statement and function you mentioned don't exist in wp-includes/post.php . Please advise.

#602004

Hi, sorry for bouncing this ticket around between supporters. Several supporters are taking rotating vacations so I apologize for the inconsistency. Shane will return Tuesday, Jan 2. In the meantime I looked at your message and I think that Shane must have meant /wp-admin/wp-includes/post.php

#602311

Hi Christian,
I can't find this line in /wp-admin/includes/post.php either. Can you be more specific (line number etc)?

#602355

I assumed it was line 1744. I was trying to install the clone you provided earlier for Minesh so I can do some deeper debugging locally, but the download link is no longer working. Is it possible to repost that package? I have an older version of your site but I'm unable to replicate the problem in that setup.

#602361

Here you go: hidden link

As we've managed this before, the backup only includes the database sql file and wp-content, minus the uploads folder. Let me know if this works, thanks!

#602718
Screen Shot 2018-01-02 at 12.02.59 PM.png

Okay thank you. I'm having a bit of trouble. Here are the steps I followed, starting from a clean server:
Imported your backup.sql file into my DB using Western ISO Latin-1 encoding
Expanded new WordPress 4.9.1 from zip file
Moved all expanded files and folders except wp-content into my server root
Moved your backup wp-content into my server root
Created new wp-config.php file in root, pointing to my localhost db
Renamed plugins folder to plugins-bak
Renamed themes folder to themes-bak
Manually inserted new admin user into DB for testing
Manually changed siteurl and home in db options table to point to my local environment
Logged in, then navigated to Appearance > Themes
Reverted themes folder name on server (renamed to "themes", reverted access to theme files)
Switched to default Twenty Seventeen theme
Navigated to plugins.php, saw error messages about deactivated plugins
Reverted plugins folder name on server (renamed to "plugins", reverted access to plugin files)
Activated Types, activated Access
Edited Theater Art Form - This was successful. That indicates there is a conflict somewhere in the theme or other plugins, so I continued testing.
Switched to Newspaper parent theme
Edited Theater Art Form - This was successful.
Activated Newspaper child theme
Saw Fatal error: Call to undefined function icl_register_string(). I assume you have some WPML-related code in your child theme.
Activated all WPML plugins
At this point wp-admin lost all styles, and the console error "jQuery is not defined" was displayed. See screenshot.

I'm not sure what to do from here, do you have any advice? Are any specific plugins required to restore the admin styles?

#606620

Hi Christian,

I am a little confused, not sure what to make of your answer. Are you saying that Types is conflicting with WPML? This issue seems to be so specific that I am having it hard to find that the Theater artform taxonomy, and nothing else, would be affected.

Thoughts?

Thanks,
Nadav