Trouble accessing JS file from plugin: Current implementation (implementing parsley.js library) Background: windows 10 - xampp 1.8.2 - apache 2.4, php 5.6
wp_enqueue_script( 'parsley_script', plugin_dir_url( __FILE__ ).'js/parsley.min.js');
The file present and receives 403
Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server.
Error log shows
[access_compat:error] [pid 4024:tid 2456] [client 127.0.0.1:62015] AH01797: client denied by server configuration:
Server configuration
<Directory "D:/www/htdocs/wordpress">
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
.htaccess
# BEGIN s2Member GZIP exclusions
<IfModule rewrite_module>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+ [OR]
RewriteCond %{QUERY_STRING} (^|\?|&)no-gzip\=1
RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
This similar question is not valid on a window box (permissions) wordpress - Error 403 file javascript plugin wordpress
Please help. I can add this same file to a theme/ directory and don't get the 403 error. It can be bypassed but the reason behind something so trivial is bugging me beyond belief. Also, I would like to isolate the script to the plugin as it should not be dependent on the theme (since the plugin creates the form required as a short code)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire