? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
20 Jul 2020

Pull Request for Issue #18566

Summary of Changes

The TEL Form filter being totally broken ( https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Form/Form.php#L1466-L1544 ), the filter should never be used in the fields parameters.

Changing telephone filter tel to text in sql upgrade #__fields table for B/C.
Taking off the Telephone filter in the fields plugin parameters.

Testing Instructions

Create 3 fields (type text, textarea, repeatable->text
Use the Telephone filter => number always get an unwanted period when saved when editing an article, various formats are not honored.

Patch and try to create new fields of the same type (no need to save them)
The filter field telephone is no more proposed.

Use the new sql update => all existing fields which have been set with the tel filter are modified to use the text filter.

@richard67
I only created the sql update for mysql. Please add for postgresql and sqlazure

avatar infograf768 infograf768 - open - 20 Jul 2020
avatar infograf768 infograf768 - change - 20 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jul 2020
Category SQL Administration com_admin Front End Plugins
avatar richard67
richard67 - comment - 20 Jul 2020

Please add for postgresql and sqlazure

Done, see infograf768#56 .

avatar infograf768 infograf768 - change - 20 Jul 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jul 2020
Category SQL Administration com_admin Front End Plugins SQL Administration com_admin Postgresql MS SQL Front End Plugins
avatar infograf768
infograf768 - comment - 20 Jul 2020

Done. Tks.

avatar richard67
richard67 - comment - 20 Jul 2020

It seems the language string can either be removed or be marked as deprecated, not sure what's the right way.

As far as I could see it is only used at places where it is removed with this PR:

richard@vmkubu02:~/lamp/public_html/joomla-cms-4.0-dev$ find ./ -type f -name "*\.*" -exec grep -iHn "JLIB_FILTER_PARAMS_TEL" {} \;
./administrator/language/en-GB/lib_joomla.ini:317:JLIB_FILTER_PARAMS_TEL="Telephone"
./plugins/fields/text/text.xml:39:                                      <option value="tel">JLIB_FILTER_PARAMS_TEL</option>
./plugins/fields/text/params/text.xml:20:                               <option value="tel">JLIB_FILTER_PARAMS_TEL</option>
./plugins/fields/textarea/textarea.xml:62:                                      <option value="tel">JLIB_FILTER_PARAMS_TEL</option>
./plugins/fields/textarea/params/textarea.xml:41:                               <option value="tel">JLIB_FILTER_PARAMS_TEL</option>
./language/en-GB/lib_joomla.ini:317:JLIB_FILTER_PARAMS_TEL="Telephone"
richard@vmkubu02:~/lamp/public_html/joomla-cms-4.0-dev$
avatar infograf768
infograf768 - comment - 20 Jul 2020

One never knows what one does with some core strings. Also, let's hope someone, one day, when on booze, corrects the TEL filter... ?

avatar richard67
richard67 - comment - 20 Jul 2020

I see, one could still use the filter from the library and the corresponding text in some 3rd party stuff. All fine.

avatar infograf768
infograf768 - comment - 23 Jul 2020

@HLeithner
I guess this PR interests no one. Can you still get it in?

avatar HLeithner
HLeithner - comment - 23 Jul 2020

Why don't we fix it?

avatar infograf768
infograf768 - comment - 23 Jul 2020

Good luck for that. The preg are very complex.
I have no idea who has done that code and it was never used in core until these fields were created.

avatar ghost
ghost - comment - 8 Sep 2020

Use the new sql update

How?

avatar infograf768
infograf768 - comment - 8 Sep 2020

Usually running the update query with PhpMyadmin, replacing #__fields by your db prefix.
But it looks like this PR is not going to make it...

avatar Formatio-hippocampi Formatio-hippocampi - test_item - 8 Sep 2020 - Tested unsuccessfully
avatar ghost
ghost - comment - 8 Sep 2020

I have tested this item ? unsuccessfully on a45258d

Filter "Telephone" deleted, but after SQL-Update:

  • "Text" and "Textarea" > "Use Settings from Plugin" (which is "Text")
  • "Repeatable" > "No"

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30142.
avatar infograf768
infograf768 - comment - 8 Sep 2020

Sorry, I do not understand your comment. Please post screenshots and results following also instrauctions in #18566

avatar ghost
ghost - comment - 8 Sep 2020

Use the new sql update => all existing fields which have been set with the tel filter are modified to use the text filter.

  • Field Text and Textarea has Filter Use Settings from Plugin (not Text as written in Testing Instructions)
  • Field Repeatable has Filter No (not Text as written in Testing Instructions)
avatar infograf768
infograf768 - comment - 9 Sep 2020

You are right and it looks like not fully.
What I found out.
Indeed when editing the field itself, it displays what you wrote.
But if you do not modify the field, when using the field when editing an article it uses the text filter.
It's weird indeed. I can't find the reason.

avatar zero-24
zero-24 - comment - 12 Jun 2022

@infograf768 I would say we should close this PR for J3 and not break other sites. For now we could start a new PR to fix the migration sql against j4.

avatar zero-24 zero-24 - change - 12 Jun 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-06-12 17:51:33
Closed_By zero-24
Labels Added: ?
Removed: ?
avatar zero-24 zero-24 - close - 12 Jun 2022
avatar richard67
richard67 - comment - 12 Jun 2022

@infograf768 I would say we should close this PR for J3 and not break other sites. For now we could start a new PR to fix the migration sql against j4.

@zero-24 Who will do the new PR? I don't think @infograf768 is still available.

avatar richard67
richard67 - comment - 12 Jun 2022

@zero-24 P.S.: And should the issue #18566 be re-opened?

avatar infograf768
infograf768 - comment - 13 Jun 2022

And should the issue https://github.com/joomla/joomla-cms/issues/18566 be re-opened?

It should imho

Add a Comment

Login with GitHub to post a comment