WithEditableName explained

Topics: Developer Forum, Project Management Forum, User Forum
Mar 16, 2012 at 12:05 PM

Hi there

Just having an issue with the WithEditableName attribute in my CMS.

I've had a few complaints from the guy who looks after the SEO on one of my sites that the name (URL segment) of some of my pages he has created has changed to a number.

He's sure that he's used plain english titles (eg the URL would be www.acme.com/frequently-asked-questions" but when he's come back to edit the page, the title has reverted to a number (eg www.acme.com/456).

I can't seem to replicate the issue but when I've been testing I've noiced that if I click the padlock into the closed position (so that the title cannot be changed), when I reopen and edit the page, the padlock is unlocked again.

I've just noticed that I have a WithEditableName attribute on my base class (abstractpage.cs):

WithEditableName(ContainerName = Tabs.Content)]

and also in my content page class which derives from abstract page:

WithEditableName("URL Segment", 10, ContainerName = Tabs.Details)

Could this be the cause of my problems?

Coordinator
Mar 17, 2012 at 12:49 PM

The problem is probably one that was fixed recently. When you post an input that is disabled the values isn't posted. 

Here's the fix (which is included in 2.2.5 available on nuget)

https://github.com/n2cms/n2cms/commit/c78571bb32d6e7a32c0e70bc69c1c8868a9360c5

Mar 19, 2012 at 3:25 PM

Thanks Libardo. I'll try using 2.2.5.