Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
shortcut.module
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
30 Nov 2014 at 14:36 UTC
Updated:
25 Dec 2014 at 16:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
daffie commentedI would like to get this fixed. So I will do a good review for posted patches.
Comment #2
daffie commentedComment #3
daffie commentedThe class variables $id and $label need to become protected.
No extra functions need to be added.
Comment #4
areke commentedA patch to protect $id and $label.
Comment #5
areke commentedComment #7
daffie commentedThe reason that your patch failed testing is that outside the NodeType class the class variables are no longer accessible. And it will result in an error. Use the methods id() and label() to fix this. If you need the set a variable use set('id', $value) or set('label', $value).
Comment #8
areke commentedComment #9
rpayanmany progress @areke?
Comment #10
areke commented@rpayanm, not yet. If you want you can take it.
Comment #11
rpayanmWorking on this!
Comment #12
rpayanmLet me see.
Comment #14
rpayanmComment #15
tadityar commentedTrying.
Comment #17
tadityar commentedComment #18
daffie commentedThe problem is that the ShortcutSetsTest.php is failing. Seen as we changed the class variables from public to protected they are no longer directly accessible outside of the class ShortcutSet. Since the failing test is part of the same module shortcut as is the class. I would start by looking for places in the module where a shortcut entity is accessing the variable $id or $label directly (->id or ->label) and not via a method (->id() or ->label()). Hope this will help.
Comment #19
tadityar commented@daffie is this correct though changing the
$default_set()->id() to $default_set('id', $value)?Thank you for your explanation, gonna try again :)
Comment #20
daffie commentedThe function shortcut_default_set() returns an instance of ShortcutSet. If you want to do something with it you must use methods. If you want to set the value of the variable $id do $default_set->set('id', your_new_id_value).
Comment #21
tadityar commentedComment #23
preshetin commentedTrying. In this patch I tried to implement #18 instructions.
Comment #24
daffie commentedAll the class variables are protected.
There are already getter functions available, so no need for new ones.
The test-server give it green.
It all looks good to me, so for me it is RTBC.
Comment #25
alexpottCommitted 6031d0b and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.
We should not be changing the file modes to 755. Fixed on commit.