In the administration (configuration) for Content Locking, I have the the option selected to "Add Cancel button". I also have all my content types selected. However, the Cancel button appears on some content types but not on others. This seems like a bug to me. And I am completely stumped how to fix it. Any thoughts?

Comments

middlenewman’s picture

As I was listing which of my content types didn't have the Cancel button, I started to realize I can predict which ones wouldn't have it...Any content type that is two or more separated words wouldn't have the Cancel button. Not sure where in the module this can be patched though or if I need to change my naming of content types.

ohnobinki’s picture

What do you mean by `content type name'? The `machine-friendly' name or the user-friendly name?

Also, what means/module are you using to spawn these content types or provides these content types so that I know how to reproduce the problem most directly?

Thanks for this information.

middlenewman’s picture

So I am setting up Drupal for different departments to access, so I have content types for each department. Say Public Works, has a node/content type called "Public Works" and "Public Works Events", so they know which content belongs to them. Their machine names are then translated to "public_works" and "public_works_events". However, when I have content for our Parks and Recreation, I just called it "Parks" and that works but "Parks Events" doesn't have the Cancel button.
I then went back to edit the Content Types under Administration > Structure (using what comes with the Drupal core, no extra module for that) to change the naming for "Public Works" to "PublicWorks" and the machine name to "publicworks" but simply changing that (cleared cache and ran cron just because) doesn't work.

middlenewman’s picture

There was a duh moment...Well when I changed the name, I had to go back to the configuration for Content Lock and choose that content type again to use the module.
However, since Drupal allows for spacing in Content Type's names, this really does need to be patched.

middlenewman’s picture

And it is specifically the machine friendly name...
But changing that to have no underscore fixes the issue.

ohnobinki’s picture

Status: Active » Fixed

Fixed in a360e96 for 7.x-1.x and 8.x-1.x.

Thanks for reporting! Hopefully I can make a new release soon...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.