Title: [BUG] 2.1 get_static_url() returning wrong value
Last modified: August 24, 2016

---

# [BUG] 2.1 get_static_url() returning wrong value

 *  Resolved [Milamber](https://wordpress.org/support/users/milamber/)
 * (@milamber)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/bug-21-get_static_url-returning-wrong-value/)
 * get_static_url() in nextgen-gallery/products/photocrati_nextgen/modules/mvc/package.
   module.mvc.php is missing a leading slash on its return value.
 * eg.
    <link rel=”stylesheet” href=”[http://domain.comwp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/gritter/css/gritter.min.css?ver=4.2.2″&gt](http://domain.comwp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/gritter/css/gritter.min.css?ver=4.2.2″&gt);
   <link rel=”stylesheet” href=”[http://domain.comwp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/ngg_progressbar.min.css?ver=4.2.2″&gt](http://domain.comwp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_admin/static/ngg_progressbar.min.css?ver=4.2.2″&gt);
 * Quick and dirty fix:
    package.module.mvc.php Ln 156 Change: return $retval; To:
   return ‘/’.$retval;
 * [https://wordpress.org/plugins/nextgen-gallery/](https://wordpress.org/plugins/nextgen-gallery/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Benjamin](https://wordpress.org/support/users/benjaminowens/)
 * (@benjaminowens)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/bug-21-get_static_url-returning-wrong-value/#post-6169711)
 * The results of get_static_url() should be a full URI ([https://example.org/path/to/file.css](https://example.org/path/to/file.css))
   and not a relative path (/path/to/file.css). Are you defining your own WP_CONTENT_URL
   or WP_PLUGIN_URL constants? According to [The Codex](https://codex.wordpress.org/Determining_Plugin_and_Content_Directories)
   they should both be a full URL.
 *  Thread Starter [Milamber](https://wordpress.org/support/users/milamber/)
 * (@milamber)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/bug-21-get_static_url-returning-wrong-value/#post-6169712)
 * Thanks for the info Benjamin, looks like someone had indeed overwritten WP_CONTENT_URL
 * define(‘WP_CONTENT_URL’, ‘/wp-content’);
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/bug-21-get_static_url-returning-wrong-value/#post-6169720)
 * [@milamber](https://wordpress.org/support/users/milamber/) – Thanks for the update.
 * – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[BUG] 2.1 get_static_url() returning wrong value’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/bug-21-get_static_url-returning-wrong-value/#post-6169720)
 * Status: resolved