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

Saving with empty Cache Location path does not default properly #253

Open
MarcGuay opened this issue Dec 10, 2024 · 1 comment
Open

Saving with empty Cache Location path does not default properly #253

MarcGuay opened this issue Dec 10, 2024 · 1 comment

Comments

@MarcGuay
Copy link
Contributor

MarcGuay commented Dec 10, 2024

When you save the settings with an empty Cache Location, it does not default to WPSCSS_PLUGIN_DIR . '/cache/'.

I see two problems in class/class-wp-scss.php:

  1. The isset check on line 167 (and 165 & 166 actually) do not work as expected because WordPress will store an empty string if text fields are empty, which will be evaluated as true, so the value of $cache_dir_setting will be an empty string and not WPSCSS_PLUGIN_DIR . '/cache/'.

  2. On line 202 it is assumed that the cache dir will be prefixed in the base directory, which is not true for the default setting.

@MarcGuay
Copy link
Contributor Author

For anyone struggling with this while the issue is still open, you'll need to enter a value in the Cache Location field. I use the Current Theme as my base dir and I am inputting /assets/wp-scss-cache/.

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

1 participant