When I try to rename a custom relationship label in studio and click "save & deploy" even though I get the "This operation is completed successfully" message but the label revert to it's original value and does not update.
As with non-relationship labels after clicking on the "save & deploy" button the label should keep it's changed name.
After clicking the "save & deploy" button the name of the relationship labels do not save and revert to it's original name.
A possible reason for the bug is that the function addLabels in public/modules/ModuleBuilder/parsers/parser.label.php does not act differently for custom relationship labels then other non-relationship labels and therefor does not update all the extra files associated with relationship labels.
1.Create a new custom relationship.
2.Rename it in studio on the labels page.
3.Click "save & deploy".
This appear to be a long time issue that is referenced in #551, #3872, #2886 and https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/2562-renaming-relationship-label.
and yet it is still not solved. Even though this bug is only visual, it is a common occurrence to rename a relationship and so this bug is easily found and I think should be given a medium priority.
Hi @Tuckan
Is there any difference between this new Issue here and the older ones you link to? I'm just wondering if we need this one. Thanks.
Here is a fix I do on every update.
In /SuiteCRM/include/SugarObjects/LanguageManager.php
Function: "refreshLanguage"
Original Array:
$lang_paths = array(
'modules/'.$module.'/language/'.$lang.'.lang.php',
'modules/'.$module.'/language/'.$lang.'.lang.override.php',
'custom/modules/'.$module.'/language/'.$lang.'.lang.php',
'custom/modules/'.$module.'/Ext/Language/'.$lang.'.lang.ext.php',
);
It should be like this:
$lang_paths = array(
'modules/'.$module.'/language/'.$lang.'.lang.php',
'modules/'.$module.'/language/'.$lang.'.lang.override.php',
'custom/modules/'.$module.'/Ext/Language/'.$lang.'.lang.ext.php',
'custom/modules/'.$module.'/language/'.$lang.'.lang.php',
);
The order of the last two lines is reversed. Unfortunately this change is not upgrade safe.
Well, should that be a PR made to core? Does it have any down-sides that you know of?
Its just a CC from this topic :
https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/2562-renaming-relationship-label
I have no down sides that I know, but you should read the entire topic cause im not a pro !
Its just a part of my after-update.doc that I do on every update ahah
Hhmm it seems to come from a SugarCRM hotfix, I'd say it should be safe to use in core.
What do you think @samus-aran?
@holdusback I tried that fix but unfortunately it did not fix the issue.
@pgorod I think the issue is similar to the older issues, I wanted to collect all data of the bug into one place and to inform that the fix from #551 did not solve the issue completely.
From my debugging I noticed that on parser.label.php in the function addLabels the parameter $forRelationshipLabel is set to false when renaming relationship labels. I tried setting it to true and label changes but the value reverts back after repair & rebuild.
Confirmed in 7.11.8