I've got a link in my header, the path of which is 'user/login'. I have checked the option in the admin screen to 'Enable for login links' so that clicking the link will load the login form in a colorbox overlay.

This works great on everypage, bar one. The only thing that is different about this page is that it is a node/add page, which I have set to render using my theme, rather than the normal admin screens, via the following addition to template.php:

/**
* Implementation of hook_theme() to enable
* modification of contact us form through template file
* more info: http://drupal.org/node/1092122
* and: http://drupal.org/node/1200216
*/
function transversal_theme($existing, $type, $theme, $path) {
  return array(
    'contact_us_node_form' => array(
      'render element' => 'form',
      // set name of template file
      'template' => 'contact-us-node-form',
      // set path to new template file
      'path' => drupal_get_path('theme', 'theme_name') . '/templates/forms',
    )
  );
} // end function transversal_theme;

For some reason, none of the colorbox scripts are loaded at all on this page. The knock on effect of this is that no colorbox functionality can be used on this page at all - not just the login form pop up.

Do you have any idea why this is? Does colorbox only work on 'front end' (as in viewing, not adding or editing) content? Do you have any suggestions for a work around?

Thanks!

Comments

carl.brown’s picture

Title: Scripts not loaded for login link on node/add pages » Scripts not loaded on node/add pages

Updated title to better reflect problem, rather than my specific situation...

carl.brown’s picture

Status: Active » Closed (works as designed)

Thanks to #1189054: Colorbox module's "enable on every page" conflicts with other modules e.g. image browser i realised that I just wasn't looking hard enough, so closing this issue.
In the advanced settings section of the Colorbox admin page you can explicitly define which pages to disable colorbox on. By default, this includes node/add/* meaning that it won't work on any node creation pages.
To get around the problem, I simply had to explicitly state each of the content types on my site, instead of using the wildcard, and not include the the one that I wanted to enable the scripts for. It's a bit long winded, and would need to be remembered whenever new content types are added, but at least there's a solution.

Cheers @fryo!