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

Textfilter-Settings Own blacklist doesn´t work at CustomFields Type Editor #26185

Closed
BPBlueprint opened this issue Sep 6, 2019 · 2 comments
Closed

Comments

@BPBlueprint
Copy link

Steps to reproduce the issue

  1. Set Filters for Joomla! Configuration > Textfilter > Blacklist
    a) Blacklist Filter Elements: p,span
    b) Blacklist Filter Attributes: style

  2. User TinyMCE as editor

  3. Create CustomField Type "Editor"

  4. Fill this text/code into an article:

    This is my text.

    a) into the usual Joomla!-article-content-Editor-Field
    b) into our created CustomField-Editor-Field

    SAFE the article

Expected result

After saving the article we expect the code to be filtered on both Joomla!-article-content-field and CustomField-Editor-Field

Code should look like that:
This is my text.

Actual result

Code is filtered correctly at Joomla!-article-content-Editor-Field
Code isn´t filtered correctly in CustomField-Editor-Field

No matter which plugin-filter-settings I use at!

System information (as much as possible)

Joomla! 3.9.11

Additional comments

@zero-24
Copy link
Contributor

zero-24 commented Sep 6, 2019

Ok i can reproduce the problem. The problem is that there seams to be no initial value for the global options.

As a workaround i would suggest to go to the Fields - Editor Plugin, change nothing and just hit save. Another workaround could be to set the filter option in the field itself to "Text".

@laoneo @mbabker @HLeithner Do you have any suggestions on how to deal with that kind of issues?

As of now we don't set the initial values to the DB: https://github.com/joomla/joomla-cms/blob/staging/installation/sql/mysql/joomla.sql#L640

Here:
https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_fields/libraries/fieldsplugin.php#L180-L185

We loop over the params and the use global option only works for sure in case we have an global value in the database.

So is the only fix to ship with that default values in the database or did i have overread something?

On a quick look this also does not seam to be limited to editor but should affect all fields that depend on use default from plugin settings or any default value that is set in the plugin but not saved yet.

@brianteeman
Copy link
Contributor

Thank you for raising this issue.

Joomla 3 is now in security only mode with no further bug fixes or new features.

This issue is still present in joomla 4 and I have created a pull request for it #38617
cc @zero-24

@alikon alikon closed this as completed Aug 28, 2022
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

5 participants