• NGGALLERY_URLPATH is defined as:
    define(‘NGGALLERY_URLPATH’, WP_PLUGIN_URL . ‘/’ . plugin_basename( dirname(__FILE__) ) . ‘/’ );

    this results in wrong stylesheet/javascript urls if the wordpress installation directory is symlinked like I have:

    /var/www/wordpress is a symlink to /var/www/wordpress-2.8.4 and wordpress path is configured as /var/www/wordpress.

    In this case the gallery includes stylesheets for example as:

    <link rel=’stylesheet’ id=’NextGEN-css’ href=’https://mysite.com/wp-content/plugins/var/www/wordpress-2.8.4/wp-content/plugins/nextgen-gallery/css/Black_Minimalism.css?ver=1.0.0&#8242; type=’text/css’ media=’screen’ />

    I’m not sure if this really is NextGEN’s fault since it looks like the wordpress’s plugin_basename -function doesn’t behave similarily with symlinks and directories which is expected since php’s dirname function is used…

Viewing 4 replies - 1 through 4 (of 4 total)
  • sounds like a general wordpress plugin… have you similar issues with other plugins ?

    Thread Starter lassizci

    (@lassizci)

    I didn’t by the time writing, but I faced the same thing recently with another one. I also did some experiments and looks like the bug is in wordpress library function plugin_basename which, according to comments, should separate the plugin name from plugin file name, but it doesn’t do that in case there are symbolic links on the path.

    Thread Starter lassizci

    (@lassizci)

    __FILE__ constant doesn’t work the same way across the different php versions. However in recent versions it works by returning absolute path and resolving symbolic links. WordPress path detection logick just doesn’t seem to be able to handle the scenario..

    Hey did anyone solve this issue?
    Same problem..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: NextGEN Gallery] NGGALLERY_URLPATH determined incorrectly in some cases’ is closed to new replies.