I have a custom module that which uses drupal_execute('content_copy_import_form', $data) from within the .install file to set up content types. When doing this with the rdf module enabled calls in the rdf_form_alter routine to rdf_uri_to_qname fail because the rdf_init function has not yet been called.

I am attaching a patch which adds the include calls to the rdf_form_alter routine in any condition where it gets called but the files haven't been included yet.

Given that it is generally not good form to call drupal_execute from .install files feedback on better ways to interact correctly with both the RDF module and other modules when needing to call drupal_execute in this condition is welcome. I can work around the error by including the files myself when detecting the rdf module is installed but that solution seems awkward as well.

CommentFileSizeAuthor
rdf_install.patch657 bytestekante
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

milesw’s picture

Project: Resource Description Framework (RDF) » RDF Extensions
scor’s picture

Project: RDF Extensions » Resource Description Framework (RDF)
Version: 7.x-2.x-dev » 6.x-1.x-dev

This only applies to RDF in Drupal 6. RDFx in Drupal 7 has a completely different API.

smustgrave’s picture

Issue summary: View changes
Status: Active » Closed (outdated)