Problem/Motivation
When editing a channel (for example admin/config/services/entity_share/channel/abc/edit). and then adding a new search, the label of the added search replaces the label of the channel.
Steps to reproduce
Browse to add a channel: admin/config/services/entity_share/channel/add
Enter label "New Channel label"
Select Entity type "Content"
Select Bundle "Basic Page"
scroll to the bottom and click "Save"
Edit the newly created channel: admin/config/services/entity_share/channel/new_channel_label/edit
Observe the channel label is "New Channel label"
Click on the "Add a new search" button
Enter "status" for Path
Enter "New sort" for Label
Click "Save"
You will now be back at the Channel edit screen. Observe that the Channel title has now become the title of the new search you just added.
Proposed resolution
This is caused by both fields having the same form element id "edit-label".
in SearchAddForm.php change line 38 from
$form['label' = [
to
$form['search_label'] = [
fixes this issue. I guess the same would apply in SearchEditForm.php
Remaining tasks
Apply patch to code
User interface changes
nil
API changes
nil
Data model changes
nil
Comment | File | Size | Author |
---|---|---|---|
#3 | 3174812-2.patch | 1.13 KB | Bagz |
#3 | 3174812-1.patch | 1.07 KB | Bagz |
Comments
Comment #2
Bagz CreditAttribution: Bagz as a volunteer commentedIgnore these patches, they are not complete.
Comment #3
Bagz CreditAttribution: Bagz as a volunteer commentedNew patch files that also fix the Save method.
Comment #4
GrimreaperComment #5
GrimreaperHello,
Thanks a lot for the issue and the patch.
Also nice to see detailed steps to reproduce the issue.
I confirm the bug, nice catch!
At the beginning I didn't understand why patch impacted SearchAddForm and SearchEditForm and not the ChannelForm directly. Because all herits from EntityForm so 'label' is a special machine name.
Even if the patches do not apply because of the path and also one patch per modified file is not ideal. It is ok :). It is simple to apply manually.
Going to merge.
Comment #7
GrimreaperMerged! Thanks!