Version 7.x-2.15 includes example colorbox styles in the following code in colorbox.admin.inc:

  $form['colorbox_custom_settings']['colorbox_style'] = array(
    '#type' => 'select',
    '#title' => t('Style'),
    '#options' => $colorbox_styles,
    '#default_value' => variable_get('colorbox_style', 'default'),
    '#description' => t('Select the style to use for the Colorbox. The example styles are the ones that come with the Colorbox plugin. Select "None" if you have added Colorbox styles to your theme. <br> <strong>Examples</strong>: <ul><li><a href="/sites/all/modules/colorbox/images/admin/example_default.png" target="blank">Default</a></li><li><a href="/sites/all/modules/colorbox/images/admin/example_plain.png" target="blank">Plain</a></li><li><a href="/sites/all/modules/colorbox/images/admin/example_stockholm_syndrome.png" target="blank">Stockholm Syndrome</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_1.png" target="blank">Example 1</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_2.png" target="blank">Example 2</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_3.png" target="blank">Example 3</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_4.png" target="blank">Example 4</a></li><li><a href="/sites/all/modules/colorbox/images/admin/colorbox_example_5.png" target="blank">Example 5</a></li><li><a href="/sites/all/modules/colorbox/images/admin/example_none.png" target="blank">None</a></li></ul>'),
  );

Drupal modules should never assume the location of module directories. For example, many sites use a multisite setup or place modules in a subdirectory such as /sites/all/modules/contrib. In those types of environments, the #description will always return a "404 Not Found".

The proper approach is to always use the drupal_get_path function: https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...

drupal_get_path('module', 'colorbox')

Issue fork colorbox-3127345

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ron_s created an issue. See original summary.

ron_s’s picture

Issue summary: View changes
Neslee Canil Pinto’s picture

Status: Active » Closed (works as designed)
ron_s’s picture

Status: Closed (works as designed) » Active

Why is this "works as designed"? It's a bug that needs to be fixed.

shashikant_chauhan made their first commit to this issue’s fork.

shashikant_chauhan’s picture

Yes, @ron_s, the module location should not be assumed.

I have created the fork for this issue, it took time and a few trials and errors as I am using the issue form and merge request using GitLab for first time.
Also, it will not work with the website having like "www.example.com/website1".
Fixed this one as well using $base_url.

Regards,
Shashikant

shashikant_chauhan’s picture

Status: Active » Needs review
solideogloria’s picture

I agree this needs to be fixed. Drupal's configuration guidelines itself has the option of using the contrib folder.

Neslee Canil Pinto’s picture

Status: Needs review » Fixed

Merged to the dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.