In the documentation "social_media.add_more_social_media" must be replaced by "social_media.add_more_link".
The same mistake is in the social_media.api.php example file.
Thank you.
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 2955438-21.patch | 1.31 KB | dhirendra.mishra |
Comments
Comment #2
bhanuprakashnani commentedThere is no difference between "social_media.add_more_social_media" and "social_media.add_more_social_media". Did I understand it wrong?
Comment #3
filipposcarselli commentedSorry for my mistake. In the documentation "social_media.add_more_social_media" must be replaced by "social_media.add_more_link".
The same in social_media.api.php :
public static function getSubscribedEvents() {
$events = array();
$events['social_media.add_more_social_media'][] = array('addMoreSocialMedia', 39);
$events['social_media.pre_execute'][] = array('pre_executeSocialMedia', 39);
$events['social_media.pre_render'][] = array('pre_rednerSocialMedia', 39);
return $events;
}
public static function getSubscribedEvents() {
$events = array();
$events['social_media.add_more_link'][] = array('addMoreSocialMedia', 39);
$events['social_media.pre_execute'][] = array('pre_executeSocialMedia', 39);
$events['social_media.pre_render'][] = array('pre_rednerSocialMedia', 39);
return $events;
}
Comment #4
bhanuprakashnani commentedMade the needed changes. Please review.
Comment #5
Anonymous (not verified) commentedUsing this patch, I was able to create a module that adds Diaspora as a service that can be used for sharing.
I use the following settings:
API URL:
http://sharetodiaspora.github.io/?title=[current-page:title]&url=[curren...
Alternative image link:
/modules/custom/social_media_diaspora/icons/diaspora.svg
Comment #6
Anonymous (not verified) commentedComment #7
Anonymous (not verified) commentedThis is not just about documentation, but an important correction to the API.
Comment #8
bhanuprakashnani commentedReview, please?
Comment #9
bhanuprakashnani commentedCan someone look forward into this issue?
Comment #10
msankhala commentedComment #11
msankhala commented@Andreas Speck This issue is not the correct place to share about your custom module.
Comment #12
msankhala commentedChanges look good. There is one more place where it should be renamed. docblock of addMoreSocialMedia() method in api.php file.
Comment #13
bhanuprakashnani commentedChanged it where mentioned. Please review and mention if any more changes are to be made. Thank you.
Comment #14
msankhala commentedChanges look good. Patch #13 applies cleanly and fixes the issue with dispatch event social_media.add_more_link documentation.
Comment #15
bhanuprakashnani commentedPlease give the fixed tag to this issue.
Comment #16
scuba_flyMakes sense to rename this.
Have to look if this changes is backwords compatible since API change was mentioned.
When fixing an issue we should apply the coding standards. This uses the old array() syntax. We should use the new [] array syntax for drupal 8 modules.
Comment #17
scuba_flyUnassigning this, since it is an old issue. Feel free to reassign it when you work on this.
Comment #18
avpadernoComment #19
rithesh bk commentedwe will work on VbContribution2020
Comment #20
dhirendra.mishra commentedWorking on this.
Comment #21
dhirendra.mishra commentedI have updated the patch from scratch as #13 was not applying to me.
Please review the patch.