CMS Administrator unable to delete content type or field

I am logged in as a CMS Administrator and when I try to delete a field in a Content Type I get: “Access denied You don’t have permissions to perform this action. Please contact your administrator to request access.” The same message shows when I try to delete a Content Type. Currently using 26.01.22-02 but this issue started earlier.

Ivan,

From the Maintenance tab, do a full reindex and flush all caches, this might clear it up.

It’s entirely possible that this field is on a critical system structure and protected against deletion. You could log into the test site and try it there, or tell us what field it is.

If this is a relatively new or safe install, you could try the fix asset inconsistencies button as a last-ditch option, that usually fixes any db errors that might lead to this. It’s dangerous though, should do a backup before using it.

Mark

Mark,

I did try the full reindex and also cleared all caches. This is not a system content type. It’s a new type that I add. I am logged in as a user who is in the CMS Administrator group. I add a new content type. Then I just want to delete it. I select Delete, confirm it, then I get the “Access denied You don’t have permissions to perform this action. Please contact your administrator to request access.”

Okay, so it could be the user getting it’s permissions messed up. Do you have a different user account with Admin privileges?
You could also try setting permissions on the structure (check all of them) which should let anyone delete it, since that’s all you really want to do.
Lastly you could open the log when you try to delete it and see if there is something there that helps clarify.

M

Yes, I tries other users who are admins and it’s the same behavior. I also tried to permission the content type to a different group the user belongs to - with all permissions checked - same issue.

What specific log file should I be looking at for the permission related messages? I looked at all of them and I don’t see any errors that might indicate what the issue might be. This is frustrating, as I am unable to delete any content type, even a field in a content type.

I’ve never seen this happen before.
Under Roles & Tools, Users, the user you are using has “CMS Administrator” come up?
How are you running this dotCMS instance? Perhaps your database is locked or something.

I would go to Maintenance, Log Files, and Tail the dotcms.log; I bet if there is a db issue that disallows any alterations you’ll see some sort of error message. Have you tried shutting down and restarting? Drastic, sure.

Mark, would deleting the default site cause this type of permission behavior? A while back I deleted the default site and now that I think about it, it might have some implications with inherited permissions.

Not for a CMS Admin, no. They should be allowed super-users regardless of permissions. My guess is the data is someone messed up. Tail the log when you try to delete it and share the results. Also, is the content type marked as fixed? That might prevent it from being deleted.

When I try to delete the content type, it doesn’t write anything to the logs. However, I can see the following in the catalina.log that has the getPermissionMetadata call:

26-Jan-2026 09:21:26.626 WARNING [FelixStartLevel] org.glassfish.jersey.internal.Errors.logErrors The following warnings have been detected: WARNING: The (sub)resource method getPermissionMetadata in com.dotcms.rest.api.v1.system.permission.PermissionResource contains empty path annotation.
WARNING: A HTTP GET method, public javax.ws.rs.core.Response com.dotcms.rest.elasticsearch.ESContentResourcePortlet.search(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.String,java.lang.String,boolean,boolean) throws com.dotmarketing.exception.DotDataException,com.dotmarketing.exception.DotSecurityException, should not consume any entity.
WARNING: The (sub)resource method saveUpdateAsset in com.dotcms.rest.api.v1.asset.WebAssetResource contains empty path annotation.
WARNING: The (sub)resource method getAssetsInfo in com.dotcms.rest.api.v1.asset.WebAssetResource contains empty path annotation.
WARNING: The (sub)resource method announcements in com.dotcms.rest.api.v1.announcements.AnnouncementsResource contains empty path annotation.
WARNING: The (sub)resource method findVersions in com.dotcms.rest.api.v1.content.ContentVersionResource contains empty path annotation.
WARNING: The (sub)resource method getJvmInfo in com.dotcms.rest.api.v1.maintenance.JVMInfoResource contains empty path annotation.
WARNING: The (sub)resource method deleteIndividualAppSecret in com.dotcms.rest.api.v1.apps.AppsResource contains empty path annotation.
WARNING: The (sub)resource method createApp in com.dotcms.rest.api.v1.apps.AppsResource contains empty path annotation.
WARNING: The (sub)resource method listAvailableApps in com.dotcms.rest.api.v1.apps.AppsResource contains empty path annotation.
WARNING: A HTTP GET method, public javax.ws.rs.core.Response com.dotcms.rendering.js.JsResource.get(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,javax.ws.rs.core.UriInfo,java.lang.String,java.util.Map), should not consume any entity.

I run it in Docker. The database is not locked. I restarted everything that could be restarted - same issue. The log doesn’t show any errors. I tried creating a new user, I tried creating a new role that has all permissions - same issue. I am able to create a new content type, add fields, but I am not authorized to delete either the fields or the content type itself being logged in as CMS Administrator.

Can you get into the db? If so, try running a
select * from structure where velocity_var_name='$yourContentTypeVar'?

inode name description default_structure review_interval reviewer_role page_detail structuretype system fixed velocity_var_name url_map_pattern host folder expire_date_var publish_date_var mod_date sort_order icon marked_for_deletion metadata
94a03a7b528590d78d2f752479b24788 Test content type 0 1 0 0 TestContentType 3e2e6880ee25af69e29a17adffbb62d0 SYSTEM_FOLDER 2026-01-27 07:28:36-07 0 event_note 0 {“CONTENT_EDITOR2_ENABLED”: false}

Not sure what is going on here and I am concerned that something else is wrong with your DB as I have never seen this but you can try:

delete from field where structure_inode = '94a03a7b528590d78d2f752479b24788';

delete from structure where inode = '94a03a7b528590d78d2f752479b24788';

delete from inode where inode = '94a03a7b528590d78d2f752479b24788';

Failed to execute SQL : SQL delete from structure where inode = '94a03a7b528590d78d2f752479b24788'; delete from inode where inode = '94a03a7b528590d78d2f752479b24788'; failed : ERROR: update or delete on table "structure" violates foreign key constraint "workflow_scheme_x_structure_structure_id_fkey" on table "workflow_scheme_x_structure" DETAIL: Key (inode)=(94a03a7b528590d78d2f752479b24788) is still referenced from table "workflow_scheme_x_structure".

Run this first then

delete from workflow_scheme_x_structure where structure_id ='94a03a7b528590d78d2f752479b24788';

After running this, the previous three SLQ statements executed and the content type was deleted. But of course it doesn’t fix the issue with the admin not being able to do the same in the UI.

I also tried deleting other items - such as a container, a workflow, and a template - but I am receiving the same insufficient permissions message, despite being logged in as a CMS Administrator.

This is not normal and it seems like something has gotten corrupted in your db. Are you using any straight sql calls ( I mean outside of DELETEs above) to read and write to dotCMS or are trying to merge environments in custom ways? ? I would not suggest that. I’d start fresh.

No custom SQL calls - just straight dotCMS. Sounds like I’m in for a fresh start. Thank you for looking into this, anyway.

Ivan,

Sorry we couldn’t help solve this.

Perhaps be more careful in the ‘deletion of the default site’ - especially if you did it via SQL.

That may be where you initiated this problem. You can delete most of the default site in the backend by hand, takes a few minutes. You can also cause some problems deleting it, to be honest.

I’m going to go out on a limb and say that this issue happened because of SQL interactions. I’d just stay away from them entirely, however tempting. They are just about the only way to damage dotCMS.

M