This issue here is that the ensure_field code goes:
If there is a field tags:
Create an instance
Else:
Create field tags
Create an instance.
However, since T comes after M, I think that somehow, we're creating the field before taxonomy. Since taxonomy is core it doesn't bother to check if someone has already created the tags field, so it poops its pants :(
I wouldn't imagine this would happen since taxonomy is a dep of mbp, but it does.
Comments
Comment #1
ParisLiakos commentedi believe this is fixed now
Comment #3
martin_qI am still getting the error that JacobSingh describes, using the latest dev version of the code. In this version, _media_browser_plus_ensure_field_tags() still creates the Tags vocabulary during a profile installation and since that profile is based on the standard profile, standard_install() (not the taxonomy module) attempts to create it again without checking (currently line 280 of profiles/standard/standard.install).
(A thought: shouldn't taxonomy_vocabulary_save() always check that there isn't already an entry in the {taxonomy_vocabulary} table with that machine name, even if the vid isn't known or specified?)
I commented out the contents of _media_browser_plus_ensure_field_tags() and the whole profile installs correctly.
So what is the solution here?
(a) Install profiles shouldn't call standard_install() but should replicate all of it in their own hook_install() function except the small part which creates the "Tags" vocabulary?
(b) taxonomy_vocabulary_save() should check for existing vocabularies identified by the given machine_name even when vid is NULL? (If so, a bug should be filed... see #1357420: taxonomy_vocabulary_save does not check for existing machine_name)
(c) standard_install() should check whether "Tags" exists before attempting to create it?
(d) something else?
Comment #4
ParisLiakos commentedclosed #1354942: Use a different field name other than field_tags to avoid conflicts as duplicate
Comment #5
lsolesen commented@martin_q Have you had any luck finding a good solution. Marking this normal.
Comment #6
elyobo commentedNote also that uninstalling MBP will attempt to delete the field_tags field...
Comment #7
lsolesen commentedTo me it seems that the correct solution was is probably to go for #1354942: Use a different field name other than field_tags to avoid conflicts and then close this issue? What do you say elyobo?