Closed (outdated)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Product
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2016 at 07:06 UTC
Updated:
8 Jun 2016 at 18:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mglamanIs this a plugin provided by that module? I don't see a LinkGenerator plugin in core?
Comment #3
platinum1 commentedNo. Please see https://www.drupal.org/node/2688654 for more information.
Comment #4
rszrama commentedI see. Feel free to write this patch yourself. It's not something the core dev team will have time to prioritize while we flesh out the core of Commerce 2.x itself.
Comment #5
mglamanComment #6
bojanz commentedReclassifying as a feature request. Leaving this to the community, mglaman and I can't tackle this in april due to more pressing issues.
Comment #7
gbyteFirst of all thank you platinum1 for sponsoring the creation of the plugin. It now needs to be moved to commerce, I'm attaching the patch. It works well with simple_sitemap 8.x-2.x and has been already tested by a couple of people. Still I'm going to set the status to 'needs review' for good measure.
As the creator/maintainer of simple_sitemap I know you guys must have a full schedule, but it would be great, if you could push this in a timely manner.
Thanks for all your work which will undoubtedly make D8 a great commerce platform!
Comment #8
platinum1 commentedComment #9
mglamanIt's still a feature request, and not a task since this not a Drupal core feature, or required development to get 8.x-2.x out the door.
Comment #10
bojanz commentedThis docblock should not exist.
Entity storage should never be accessed directly. It's not good that the parent module requires this.
Comment #11
gbyteThanks mate, going to look into it.
This is debatable. A simple sql query is the quickest way of getting all entity ids and the approach is universal across all entities. I can see your point however in that field storage may change for non-core modules rendering plugins unusable.
Using an entityQuery() instead of the sql query would make the generation slower (as entities will have to be loaded for additional data), but I could live with this compromise. Would the following work for you?
Comment #12
mglamanI think the proposed change looks good. Except you will want to use dependency injection to get he entity query service.
While true, it does also make this easier to implemented for entities since you only need to know the type. But any API adds abstraction and technically bloats performance, but we then have standardization.
Comment #13
gbyteThis has now been resolved within the simple_sitemap module, as as of 8.x-2.5 it makes better use of the entity API to facilitate link generating functionality for contrib entities like commerce product. This means commerce does not need to implement a plugin to be supported by simple_sitemap anymore.
Thanks for your input guys.