WebDevStudios / WDS-Simple-Page-Builder

Uses existing template parts in the currently-active theme to build a customized page with rearrangeable elements.
GNU General Public License v2.0
136 stars 25 forks source link

Since update to 1.6 php permission denied #61

Closed marsshall closed 8 years ago

marsshall commented 8 years ago

Hi, since I update to your 1.6 develop version, I have trouble to work my wds-simple page builder.

Throw this error in my single template: http://i.imgur.com/7LJJ2IS.png

Calling page builder area with: <?php wds_page_builder_area('review'); ?>

Using this page builder options: http://i.imgur.com/7pHCzsG.png

Thank in advance.

jazzsequence commented 8 years ago

@marsshall That looks like a permissions issue. I would check to make sure the /parts directory in your theme exists and that your server (I'm guessing local dev environment on Windows?) has permission to access the files in that directory.

rianbotha commented 8 years ago

I'm having the same issue (local dev on Windows). If I just manually include the template part using require() it works, but using wds_page_builder_area() I get `Warning: require(D:\xampp\htdocs\site\wp-content\themes\theme\parts): failed to open stream: Permission denied in D:\xampp\htdocs\wordpress\wp-includes\template.php on line 564

Fatal error: require(): Failed opening required 'D:\xampp\htdocs\site/wp-content/themes/theme/parts/' (include_path='.;C:\xampp\php\PEAR') in D:\xampp\htdocs\site\wp-includes\template.php on line 564`

rianbotha commented 8 years ago

It would appear that the issue relates to the path for the template part being wrapped in esc_url(), which then returns a blank file path. Line 419 in class-wds-page-builder-options.php

jazzsequence commented 8 years ago

@rianbotha @marsshall this should be fixed now. just changed the sanitization function.