Forum OpenACS Development: Re: Title before name_method

Collapse
Posted by Malte Sussdorff on
I dug around in project-open code and found that project-open overwrote the acs_object__name function, so uncomment the part where it first looks at the name method. Probably 21 years ago 😊.

Either way, we should avoid a breaking change. Therefore we could have an upgrade script which:

- Changes acs_object.new to not set a default title
- Delete the title wherever the title = default title

Two options
- Set the name method to a new method which preserves the old "default" behavior, (e.g. acs_object.default_title) where the name_method is empty, and make name_method mandatory. This will make it very clear which naming method is used, if title is not overwritten.
- Change the acs_object.name method to default to the old default title if the title is NULL and the name_method is NULL.