2

In other word, does the machine name of every type of Drupal object has its own scope? Do we need use some prefix?

3

A vocabulary is an entity; before Drupal 8, a View is not. So ID collisions will never be a concern, they're different types of object, and treated as such. If a View was an entity (like in D8), then its properties would be unique to its entity-type, so there's still no concern.

Addressing this specifically:

does the machine name of every type of Drupal object has its own scope?

If you consider a "Drupal object" to be an entity provided by the core API, then yes. Views doesn't use it, but its data is in a separate DB table so there's nothing to worry about. YMMV with different contrib modules, but usually if a features integration has been written, you can pretty much assume it's going to work at that most basic level.

4

If it's in a different table it's in a different scope. If it allowed you to set a similar machine name you are obviously in a different scope. If you go to a node page and try to create similar machine names you will get an error while adding the field.

taxonomyTable.same_machine_name is different from viewTable.same_machine_name

No they wont conflict when exported from features. on the features page it shows different sections like taxonomy terms, nodes, strongarm, image styles ect.. anything that could be related then it auto detects anything related and you can select what you want to go with it. That's why it's important to have unique machine names so you know right away what you are working with. When using features try to avoid using the same machine names; but you can get away with it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.