pimcore-data-definitions icon indicating copy to clipboard operation
pimcore-data-definitions copied to clipboard

Default to path instead of ID for asset links

Open dkarlovi opened this issue 4 years ago • 3 comments
trafficstars

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Branch? master

For example, xml provider has setting "Example file" which stores the reference to an asset to use.

This works, but since the reference is committed and pushed into the project, it becomes hard to keep these in sync across environments (dev, staging, prod) where you're not able to control which ID an asset get assigned:

  • on dev, the file might be 13
  • on staging, 99
  • on prod, 75

It's much easier to keep the same asset in the same path across environments.

dkarlovi avatar Jul 08 '21 11:07 dkarlovi

Agree, can you make a PR?

dpfaffenbauer avatar Jul 08 '21 11:07 dpfaffenbauer

Sure, WDYT about BC? Do we auto-upgrade to path in the UI if it's numeric?

dkarlovi avatar Jul 08 '21 11:07 dkarlovi

dev-master is a new major version, so we could ignore BC... I don't think we should upgrade the config, just rename the field and make a fallback to check for the old ID value in the Provider.

dpfaffenbauer avatar Jul 08 '21 11:07 dpfaffenbauer