Closed (fixed)
Project:
Title
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2012 at 08:39 UTC
Updated:
13 Jun 2014 at 23:38 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
roysegall commentedI made two fixes for the patch:
1. Remove the question mark from the end of each line.
2. Create a hook_update_7002 and put the the creation of the variables instead in hook_update_7001.
Comment #2
amitaibuTest should check API.
Lets use a $params variable, and change @replcaement-name to @field-name
Remove everything in the install file -- we don't need to the set the variable there.
Maybe batter "Settings for the Title module"
title_field => Title field.
Not needed.
Comment #3
roysegall commentedApply fixes.
Comment #4
amitaibuLets change this to a select list.
title_field => "Title field".
Remove "if the admin ..."
Lets add also the bundle name to the message.
Comment #5
roysegall commentedApply the fixes and i add one more thing: If we have a title_field attached, then we don't need to attach it again.
Comment #6
roysegall commentedChange status.
Comment #8
amitaibuRemove
:Description doesn't make sense. "Enable to auto-attach a title field when a bundle is created in this entity-type."
title => Title
If we are using it only once, we can remove this variable.
is already => already
* automaticly => automatically
* @bundle-name is still missing.
Also, seems tests are failing.
Comment #9
roysegall commentedComment #10
roysegall commentedChange status.
Comment #11
roysegall commentedTypo.
Comment #12
amitaibuTypo in $instacnes.
Anyway we don't need it, we can just assert field_info_instance()
Comment #13
roysegall commentedI think this is it.
Comment #14
amitaibuPatch improves settings page options.
Comment #14.0
amitaibuUpdated issue summary.
Comment #14.1
amitaibuUpdated issue summary.
Comment #15
amitaibuFixed another typo, and updated Issue summary.
Seems RTBC to me (my patches only fixes minor typos).
Comment #16
plachNice feature! It would be great if it could work on every replaced field, not only labels. For core this would mean also the taxonomy term description. In this case the admin form should talk about "Field replacement settings" and "replaced fields".
Comment #17
plachDouble space here.
Comment #18
amitaibu> on every replaced field, not only labels
What do you mean by that -- doesn't title handle only labels?
Comment #19
plachNope :)
The field replacement API works with any field/property. In the
field_replacementkey of the entity info you'll find a list of replaced fields for that entity type. Architecturally Title should be split into two modules: a Field Replacement API module dealing with field replacement in a generic fashion and a Label module dealing with entity labels. Currenlty the module name is a bit misleading but initially we tought only about node titles. Then requiring a ton of modules just to make entities translatable didn't look so promising, and we kept a single module instead of splitting it.Comment #20
amitaibu> Currenlty the module name is a bit misleading
Indeed :)
> In this case the admin form should talk about "Field replacement settings" and "replaced fields".
Ok, so you mean that the settings for should be something like this, right?:
Comment #21
plachYes, exactly.
Comment #22
plach[duplicate post]
Comment #23
roysegall commentedI upgraded the patch:

Comment #24
amitaibutitle field => replacement field
title field => replacement field
Comment #25
roysegall commentedIf so - we need to change this:
to:
right?
Comment #26
amitaibuyes
Comment #27
roysegall commentedComment #28
amitaibuComment #29
roysegall commentedI made another fix that i think it's crucial - instead of return in line 776 i replaced it to continue.
Comment #30
plachYes, it's definitely a critical change. Tests should be adjusted to check that all the selected fields are actually replaced: they should have failed above.
For consistency can we have underscores instead of dashes in the parameters names?
Comment #31
roysegall commentedYes. I'll change it and repatch
Comment #32
roysegall commentedI apply the changes that plach suggested.
Comment #33
plach@RoySegall:
Thanks for the new patch, but tests still don't check that all the selected fields for a given entity type are actually processed: we'd need to adjust the current test to check taxonomy name and description or write a new one, possibily as a full test case so that we would test also the administration UI.
Comment #34
plachComment #35
roysegall commentedThis patch apply a ui test for the patch(checking the messages that we receive from the module and submit the form).
Comment #36
roysegall commentedComment #37
plachCommitted and pushed, thanks!
I made a couple of minor fixes, interdiff attached.
Comment #38
plachComment #39.0
(not verified) commentedUpdated issue summary.