I suggest providing an option to allow changes on the field. I've rewritten the module a little bit, providing a configuration page with a checkbox, I'll attach the patch later.

Comments

Jeffrey C.’s picture

Title: Allow Changing on the Field » Allow Changes on the Field

Fixing the typo.

Jeffrey C.’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB

Applied cleanly to 7.x-1.0 release. An quite easy fix to me.

Jeffrey C.’s picture

StatusFileSize
new1.85 KB

Use this patch instead. I added variable_set in hook_install() and removed the default value when the variable is not set since it's always set; the module always gets installed first.

Jeffrey C.’s picture

I've added the update function from 7.x-1.0. Use this one!

Jeffrey C.’s picture

StatusFileSize
new2.14 KB

Oops! Forgot the file.

Jeffrey C.’s picture

StatusFileSize
new2.11 KB

Added an empty line at the end of the file so it conforms standard. This one, please!

c-logemann’s picture

Version: 7.x-1.0 » 7.x-2.x-dev

New Features are only implemented in the 7.x-2x-Branch.

Jeffrey C.’s picture

Can you please review the patch? It works just fine for me.

Jeffrey C.’s picture

Do you have any plan on releasing a stable version of the 2.x branch?

timofey’s picture

+1 I'd love to see this in 2.0!

c-logemann’s picture

@Jeffrey C.: currently there is no plan. I am currently very busy. I will take a look at the patch as soon as possible. And I try to make a plan for the future of the module.

@timofey: testing will help to get new features in a module.

timofey’s picture

Sadly, I'm getting a lot of errors. For example Line 34 function commerce_update_7101() should read something like function machine_name_update101(). Line 56 is referencing to file machine_name.admin.inc, which does not exist. So on and so forth.

Also, it would be nice to have settings like these per content type, not as a whole.

Jeffrey C.’s picture

@C_Logemann: Mind adding me as a co-maintainer?

c-logemann’s picture

Status: Needs review » Needs work

@ Jeffrey C.: Currently your code is not usable. You have forgotten to add the file "machine_name.admin.inc" in your patch and you added "function commerce_update_7101() from commerce module " to install file.

I think the possibility to change machine name field entries is a good idea. But this should be configurable per field and not global as you try to realize. I know this needs more coding but in bigger project with more than one machine name field it's very recommended.

c-logemann’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev

Just changed back to 7.x-1.x-dev because of new maintaining strategy.

c-logemann’s picture

Issue summary: View changes

Fixed the typo.

c-logemann’s picture

Issue summary: View changes
Status: Needs work » Closed (duplicate)
Related issues: +#2452563: Allow to change value of machine name field when edit entity

Meanwhile eugene.ilyin provided a working patch with settings per field: #2452563: Allow to change value of machine name field when edit entity