jemproject / JEM-Project

JEM - an Event Manager for Joomla
https://www.joomlaeventmanager.net
GNU General Public License v3.0
25 stars 36 forks source link

Error in stable (please look): Loosing all but letters in description #1719

Closed jojo12 closed 2 months ago

jojo12 commented 2 months ago

I installed the nightly and worked then with JCE-Editor in Eventdescription: The format is broken: there are no new lines, all in same (no bold) EDIT: Same with TinyMC-Editor

jojo12 commented 2 months ago

After the todays post of Kurtus in the forum I tested again, and the problem is not yet fixed or is back. If you use in frontend editvenue, and save, then there's the problem. In editvenue there's no problem! EDIT: I just see, that the problem is in the backend too!!! :-(

jojo12 commented 2 months ago

I am very confused now: I don't know exactly, what settings @Kurtus in the forum has. I tested as follows:

Testing with different templates (Cassiopeia, t4_purity_IV) with Firefox Developer Php 8.2.18 Joomla! 5.1.0 Stable

if Compat-Plugin: Activated filter="JComponentHelper::filterText" Result: works in FE and BE filter="ComponentHelper::filterText" Result: Problems in FE and BE filter="\Joomla\CMS\Component\ComponentHelper::filterText" Result: works in FE and BE filter="\Joomla\CMS\Component\JComponentHelper::filterText" Result: Problems in FE and BE filter="safehtml Result: works in FE and BE

if Compat-Plugin: Deactivated filter="JComponentHelper::filterText" Result: error Class “JComponentHelper” filter="ComponentHelper::filterText" Result: Problems in FE and BE filter="\Joomla\CMS\Component\ComponentHelper::filterText" Result: works in FE and BE filter="\Joomla\CMS\Component\JComponentHelper::filterText" Result: Problems in FE and BE filter="savehtml" Result: works in FE and BE

Can you say me, why in both "venue.xml" is used "safehtml", which has the same structure with "description"? and what's the difference between "safehtml" and "\Joomla\CMS\Component\ComponentHelper::filterText"

jojo12 commented 2 months ago

This last prososal works with and without compat plugin! What we have to do now? If there will be more system which loose all descriptions, this is heavy. Do we have to cre te a new version or what?

mckillo commented 2 months ago

I'll try to explain it:

Case 1 - When you use: filter="\Joomla\CMS\Component\ComponentHelper::filterText" JEM uses the Global Text Filter (Global Configuration - Text Filters) and here, you have more flexibility with different filters (group and type). It's dynamic by Joomla setting.

Case 2 - When you use: filter="savehtml" JEM uses this filter to have a secure html code, but this is an old filter, Joomla 5 doesn't use this filter, all of them are as case 1. This filter is static, you can't apply different filters by users (group user) or by type of filter, with this filter JEM doesn't use Global Text Filter.

mckillo commented 2 months ago

In other part of the code, for example, when JEM edits CSS file by CSS manager, this editor has a filter="raw". JEM uses the filter to ensure the content format.

mckillo commented 2 months ago

In Joomla 5.1, almost all filter (type=editor in xml file) are filter="\Joomla\CMS\Component\ComponentHelper::filterText"

jojo12 commented 2 months ago

That means for me, that we should change it in venue.xml too!

jojo12 commented 2 months ago

And now will we integrate the change in a new version? Or will we integrate it in 4.2.1 and inform the admins to reload it, because it is a dangerous thing. BECAUSE of this I let the releaseblocker

mckillo commented 2 months ago

@jojo12 Please test this commit with the final solution about filter in xml file

mckillo commented 2 months ago

I think that this will be a patch into next version 4.2.2. We'll try to resolve other issues to include into a new release, and we could close a release 4.2.2 in May 2024 (for example in 2-3 weeks). We can detect others new issues of 4.2.1 during this time too. The solution of filter field (this issue) is here.

jojo12 commented 2 months ago

I tested: the event.xml and venue.xml in frontend work fine. The event.xml in backend works fine too! But as question: To be consistent--> in venue.xml in backend should be changed from "savehtml" to "\Joomla\CMS\Component\ComponentHelper::filterText" ?

[But I see an other problem during testing: when opening and saving existing venue in backend, I get error: Call to a member function format() on bool ]

I post it separately: see #1743

mckillo commented 2 months ago

@jojo12 Now all filter in the editor type are consistent. Check it. About the new error, I can't simulate it, I can edit and save venues in back without any error. I'm work with JEM-4.2.2-dev branch.