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

get_pref('skin_editing') function error #1861

Open
cara-tm opened this issue Feb 10, 2023 · 3 comments
Open

get_pref('skin_editing') function error #1861

cara-tm opened this issue Feb 10, 2023 · 3 comments

Comments

@cara-tm
Copy link

cara-tm commented Feb 10, 2023

Expected behaviour

Return of the right value stored into the prefs table.

Actual behaviour

Not accurate.

Steps to reproduce

Store multiple themes.

When we have several themes into the back-office, get_pref('skin_editing') doesn't return the theme version stored into the correspondent field (correct entry) from the txp_prefs table. The only solution: deleting old themes.

Textpattern version: latest (4.8.8)

Web server vendor and version: not relevant here.

Database server vendor and version: not relevant here.

PHP version: {Please write here}

Operating system: {Please write here}

@Bloke
Copy link
Member

Bloke commented Feb 10, 2023

get_pref('skin_editing') is meant to return the name of the current (or last) skin that was edited - i.e. saved. Are you saying it's not doing that any more? Core relies on that quite heavily.

@bloatware
Copy link
Member

Note that it's a per user pref, so, when called on the public side, it can return some unexpected default value.

@Bloke
Copy link
Member

Bloke commented Jan 21, 2024

@cara-tm Is this still a valid concern?

Are there any, more detailed, steps to reproduce this? Perhaps some template code or plugin that fails, because I can't reproduce this. Where are you trying to use get_pref('skin_editing')? In a Page/Form? A plugin?

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

No branches or pull requests

4 participants