Closed (fixed)
Project:
AddToAny Share Buttons
Version:
8.x-1.9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
5 Apr 2018 at 08:38 UTC
Updated:
13 Sep 2018 at 15:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
yivanov commentedComment #3
yivanov commentedComment #4
micropat commentedHi Yasen,
Thank you for the patch! A few issues before we commit:
node,comment,media.hook_addtoany_entity_types_alter()should be applied in settings as well.$entity_type_definationsshould be$entity_type_definitions."entity.entity_view_display.{$bundle_of}.default").With these issues addressed, the new feature will be perfect for an AddToAny 8.x-1.10 release. :)
Comment #5
yivanov commentedPoints 1,2,3 fixed.
Regarding hyperlinking the entities - that's a tricky one. We are enabling the feature by Entity, but not by the bundle. So for example if you have Paragraph Entity with multiple bundles, to which bundle it should point? Also, if you don't have created any bundle to an entity, there shouldn't be any hyperlink.
Comment #6
yivanov commentedSorry, forgot one test line in the previous patch
Comment #7
micropat commentedThanks Yasen, great point on #4.
All of them. :) I think we should parenthetically link to each entity's available bundles like:
[x] Allow for Content (Article, Basic page)
[x] Allow for Paragraph (About this author, Call to action)
Is that doable?
Comment #8
yivanov commentedHi micropat, thanks for the feedback. Here is the patch including #4. For some entities I do not generate links, since they are more specific (Like File, User, Custom menu link). For everything else, it looks good.
Comment #9
yivanov commentedComment #10
micropat commentedThanks Yasen. In the latest patch I found that the Shortcut entity is problematic:
Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.entity_view_display.shortcut.default" does not exist.Comment #11
yivanov commentedYes, you are right. Unfortunately not all entities follow the same route pattern.
Comment #13
micropat commentedI followed up your patch #8 with a fix that whitelists a few popular entities that work with the route pattern, and also made a few more adjustments. Please give the feature a spin in
8.x-1.x-dev.Thanks again, Yasen!
Comment #14
yivanov commentedComment #16
othermachines commentedAfter updating I needed to select "Content" and save the configuration in order for my buttons to re-appear. At the very least this should be added to the release notes. Thanks -