Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The content_copy module depends on content_types.inc and content_admin.inc but does not explicitly include them. Instead, it assumes that they are being loaded by their respected modules; however, their loading is conditional on being in an "admin" context (arg(0) == 'admin'). It is not always true that the functionality of content_copy will be requested in such a context - for example, when requesting an export form programmatically.
The attached patch fixes this problem.
Thank you!
Comments
Comment #1
yched CreditAttribution: yched commentedTrue, this has been reported numerous times, let's fix this at last.
However, including files at the top-level in not recommended, for it makes the said files to be loaded for each page. Committed code only includes the files in the forms definition functions.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.