Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows IIS Fatal Error on Go Daddy #400

Closed
DevinWalker opened this issue Jul 21, 2015 · 4 comments
Closed

Windows IIS Fatal Error on Go Daddy #400

DevinWalker opened this issue Jul 21, 2015 · 4 comments

Comments

@DevinWalker
Copy link
Contributor

Using WordPress on GoDaddy's IIS and installing CMB2 results in the following error:

PHP Warning: is_readable(): open_basedir restriction in effect. File(/languages/en_US.mo) is not within the allowed path(s): (G:/PleskVhosts//give.advancedwp.org\;C:\Windows\Temp\) in G:\PleskVhosts\give.advancedwp.org\httpdocs\wordpress\wp-includes\l10n.php on line 476

Which basically means that the server configuration has a setting for permitted file paths, and that this plugin does not match the required pattern... hence the error.

I've narrowed it down to the l10ni18n method: https://github.com/WebDevStudios/CMB2/blob/master/init.php#L157

I'm looking into a fix right now that'll make IIS happy and preserve the method's functionality.

@DevinWalker
Copy link
Contributor Author

Looks like this specific function is throwing the error: https://github.com/WebDevStudios/CMB2/blob/master/init.php#L163

Which is a core WP function... still investigating

@DevinWalker
Copy link
Contributor Author

Got it... adding the full path to the to the function fixes the error we're experiencing in IIS:

$loaded = load_theme_textdomain( 'cmb2', get_template_directory() . '/languages/' );

All the examples on the Codex use get_template_directory as well: https://codex.wordpress.org/Function_Reference/load_theme_textdomain

I'm not sure why CMB2 omitted it. PR coming in a sec

@jtsternberg
Copy link
Member

Because load_plugin_textdomain && load_muplugin_textdomain both expect a relative path, and apparently load_theme_textdomain expects an absolute path. Good catch!

pluginmirror-worker pushed a commit to wp-plugins/give that referenced this issue Jul 22, 2015
* New: A front-facing JSON/XML API that makes it possible to query donation data directly from your WordPress site; this corresponds with the Zapier Add-on for Give: http://givewp.com/addons/zapier/
* New: Added warning to frontend donation forms when test mode is enabled
* Improvement: PalPal Standard now displays the multi-level text within PayPal @see: impress-org/givewp#164
* Tweak: Moved the "Test Mode" option out from General Settings to Payment Gateways > Gateway Settings from better visibility
* Tweak: Removed "Cancelled" and "Pre-Approved" payment statuses; "Failed" and "Pending" statuses should be used in their place.
* Fix: Ensure CMB2 loads text domain properly @see: CMB2/CMB2#400

git-svn-id: https://plugins.svn.wordpress.org/give/trunk@1204175 b8457f37-d9ea-0310-8a92-e5e31aec5664
pluginmirror-worker pushed a commit to wp-plugins/cmb2 that referenced this issue Jul 28, 2015
### Enhancements

* Updated/Added many translations. Props [fxbenard](https://github.com/fxbenard), ([#203](CMB2/CMB2#344)) and [Mte90](https://github.com/Mte90) for the Italian translation.
* Updated `'file_list'` field type to have a more intutive selection in the media library, and updated the 'Use file' text in the button. Props [SteveHoneyNZ](https://github.com/SteveHoneyNZ) ([#357](CMB2/CMB2#357), [#358](CMB2/CMB2#358)).
* `'closed'` group field option parameter introduced in order to set the groups as collapsed by default. Requested in [#391](CMB2/CMB2#391).
* Added `"cmb2_{$object_type}_process_fields_{$cmb_id}"` hook for hooking in and modifying the metabox or fields before the fields are processed/sanitized for saving.
* Added Comment Metabox support. Props [GregLancaster71](https://github.com/GregLancaster71) ([#238](CMB2/CMB2#238), [#244](CMB2/CMB2#244)).
* New "cmb2_{$field_id}_is_valid_img_ext" filter for determining if a field value has a valid image file-type extension.

### Bug Fixes

* `'multicheck_inline'`, `'taxonomy_radio_inline'`, and `'taxonomy_multicheck_inline'` field types were not outputting anything since it's value was not being returned. Props [ediamin](https://github.com/ediamin), ([#367](CMB2/CMB2#367), ([#405](CMB2/CMB2#405)).
* `'hidden'` type fields were not honoring the `'show_on_cb'` callback. Props [JPry](https://github.com/JPry), ([commits](CMB2/CMB2@5a4146e...1ef5ef1)).
* Fixed: There was no minified cmb2-front.min.css file.
* Fallback for fatal error with invalid timezone. Props [ryanduff](https://github.com/ryanduff) ([#385](CMB2/CMB2#385)).
* Fix issues with deleting a row from repeatable group. Props [yuks](https://github.com/yuks) ([#387](CMB2/CMB2#387)).
* Ensure value passed to `strtotime` in `make_valid_time_stamp` is cast to a string. Props [vajrasar](https://github.com/vajrasar) ([#389](CMB2/CMB2#389)).
* Fixed issue with Windows IIS and bundling CMB2 in the theme. Props [DevinWalker](https://github.com/DevinWalker), ([#400](CMB2/CMB2#400), [#401](CMB2/CMB2#401))

git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1208582 b8457f37-d9ea-0310-8a92-e5e31aec5664
pluginmirror-worker pushed a commit to wp-plugins/cmb2 that referenced this issue Jul 28, 2015
### Enhancements

* Updated/Added many translations. Props [fxbenard](https://github.com/fxbenard), ([#203](CMB2/CMB2#344)) and [Mte90](https://github.com/Mte90) for the Italian translation.
* Updated `'file_list'` field type to have a more intutive selection in the media library, and updated the 'Use file' text in the button. Props [SteveHoneyNZ](https://github.com/SteveHoneyNZ) ([#357](CMB2/CMB2#357), [#358](CMB2/CMB2#358)).
* `'closed'` group field option parameter introduced in order to set the groups as collapsed by default. Requested in [#391](CMB2/CMB2#391).
* Added `"cmb2_{$object_type}_process_fields_{$cmb_id}"` hook for hooking in and modifying the metabox or fields before the fields are processed/sanitized for saving.
* Added Comment Metabox support. Props [GregLancaster71](https://github.com/GregLancaster71) ([#238](CMB2/CMB2#238), [#244](CMB2/CMB2#244)).
* New "cmb2_{$field_id}_is_valid_img_ext" filter for determining if a field value has a valid image file-type extension.

### Bug Fixes

* `'multicheck_inline'`, `'taxonomy_radio_inline'`, and `'taxonomy_multicheck_inline'` field types were not outputting anything since it's value was not being returned. Props [ediamin](https://github.com/ediamin), ([#367](CMB2/CMB2#367), ([#405](CMB2/CMB2#405)).
* `'hidden'` type fields were not honoring the `'show_on_cb'` callback. Props [JPry](https://github.com/JPry), ([commits](CMB2/CMB2@5a4146e...1ef5ef1)).
* Fixed: There was no minified cmb2-front.min.css file.
* Fallback for fatal error with invalid timezone. Props [ryanduff](https://github.com/ryanduff) ([#385](CMB2/CMB2#385)).
* Fix issues with deleting a row from repeatable group. Props [yuks](https://github.com/yuks) ([#387](CMB2/CMB2#387)).
* Ensure value passed to `strtotime` in `make_valid_time_stamp` is cast to a string. Props [vajrasar](https://github.com/vajrasar) ([#389](CMB2/CMB2#389)).
* Fixed issue with Windows IIS and bundling CMB2 in the theme. Props [DevinWalker](https://github.com/DevinWalker), ([#400](CMB2/CMB2#400), [#401](CMB2/CMB2#401))

git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1208586 b8457f37-d9ea-0310-8a92-e5e31aec5664
@tld1990
Copy link

tld1990 commented Sep 1, 2015

Why on earth are you using load_theme_textdomain(); in your plugin? Doesn't that go completely against the logic of internationalization? Certainly messes up translation plugins such as xili-language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants