- Issue created by @RichardDavies
- First commit to issue fork.
- Merge request !116This code should fix the issue... but it would be nice to have tests to not... β (Merged) created by spuky
- π©πͺGermany spuky
I don't understand how the code added to EasyBreadcrumbBuilder.php by #2931141 is supposed to work because I don't see where it actually retrieves the alternate field title. It just seems to retrieve the original title again and then overwrites the replaced title value with the original title value:
The fetching of the Alternative Title field is done in the getTitle method of the TitleResolver Class
it would already fetch the replacement title there ... but the fetching you marked with 1. is only done if you also have "Use Page title when available" set to true.
I submitted code that would also do the Replacement for the "alternative title field". So you could use the diff as a patch for the Situation
It could be up for discussion if this replacement code for the alternative title needed.. Since if you have a dedicated field for your breadcrumb Title you could change it there without the need to change your Page Title / Menu title...
...unless the Field you use as alternative title is also a multipurpose field in your architecture..
I can understand your expectation of replacement so it might be a better UX to do the replacement in both cases
Or
make it clearer that the replacement does not apply to alternate_title_fields but only to fallback Menutitles and Pagetitles.. but not for "alternative title fields"
- π©πͺGermany spuky
Ok I reasoned about that a little more since the default config provides an fieldname (and even if the fieldname does not exist this codepath is taken... )
Option1:
have the replacement code as in my commit (we might move it after all Options to have only one place where replacements happen..)Option2:
come with empty "Alternative title field name" and provide the example in the field description...
Maybe check for existence of field on saving the config form...
Have an update function that clears the "Alternative title field name" if the field does not exist..
but even that would get Arround the replacement for users that have the "Alternative title field" on some entity types but not all... - last update
10 months ago 6 pass - Status changed to Needs review
10 months ago 10:15am 14 June 2024 - π©πͺGermany spuky
The merge request implements option 1 would like to write tests for that... but I don't know when i get to that so we could merge this as a Bug fix.
- last update
9 months ago 7 pass - π©πͺGermany spuky
from the description it seems 3220847 is a duplicate of this... issue...
- Status changed to Fixed
8 months ago 9:47am 6 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.