2019/7/31
Tag : Craft CMS

Craft CMS のエレメントのIDとUID

でUIDとIDについて少しかいたのだけど、 Craft CMS 自体の方針として、 3.1 からちょっとかわったぽい。

Updating Plugins for Craft 3.1 | Craft CMS
https://craftcms.com/guides/up...

で書かれてるのを @BUN に教えてもらった。

Store UIDs Instead of IDs #
Plugin settings are now stored in the project config. If your plugin is storing references to sections, category groups, or anything else that’s now stored in the project config, you should update those references to use UIDs instead of IDs. That’s because their IDs will potentially be different on each environment, but their UIDs will always stay the same across all environments.

uid は複数環境を想定した感じのものということで、イメージしてたものと大体同じ感じかなー。