Skip to content

Conversation

@TLWebdesign
Copy link
Contributor

Pull Request for Issue # .

Summary of Changes

Fixed the default value for position and currency.

Testing Instructions

When no currency is set it should not display anything. Now it display a "2".
When no position is set it should default back to 0 (in front) which is the same as the default in the XML.

Actual result BEFORE applying this Pull Request

"2" was displayed when no currency was set.
Default position was set to "2" which would give the same behaviour as setting it to the back, altho this was technically not possible since the default position in the XML was already set to 0 and it is a list so no user input possible.

Expected result AFTER applying this Pull Request

No "2" visible when currency is empty. And default position is still in front of the text (0).

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

Why were the defautl values not set in the database as they are with the other params

@TLWebdesign
Copy link
Contributor Author

@brianteeman maybe i don't understand your comment but afaik i did add them.

See here:

(0, 'plg_fields_number', 'plugin', 'number', 'fields', 0, 1, 1, 0, 1, '', '{"min":"1.0","max":"100.0","step":"0.1","currency":"0","position":"0","decimals":"2"}', '', 10, 0),

@richard67
Copy link
Member

richard67 commented Nov 10, 2025

Why were the defautl values not set in the database as they are with the other params

@brianteeman In fact they were added to the SQL with PR #43974 .

But the options are missing the "symbol" value.

@TLWebdesign Not sure if we need an update SQL to fix that in database. but we should at least fix base.sql so it is right from the beginning on for new installations.
Update: I think we will not need a new update SQL for fixing it in the database on updated sites. For those the missing value in the options in database will cause the default value being used in PHP. But in base.sql it should be right.

@LadySolveig
Copy link
Contributor

I have tested this item ✅ successfully on 7a1db96


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46433.

Updated the 'plg_fields_number' entry to include a 'symbol' property.
@LadySolveig
Copy link
Contributor

It still needs a little improvement. Currently, there is no space between the number and the currency symbol. And yes, the database value for the currency symbol is missing.
The fix resolves the error for the user. If you can submit the fix for the DB at short notice, I'll be happy to renew my test again.

@TLWebdesign
Copy link
Contributor Author

Hi all the SQL is changed.

@LadySolveig not adding a space is intentional as some currencies don't use spaces in between so now you get to choose to add a space or not.

@LadySolveig
Copy link
Contributor

Thanks for the explanation, that's fine for me. 👍🏼 An override can be done at any time if someone wants a space between.

@TLWebdesign
Copy link
Contributor Author

they don't need to do an override. they can just type a space after the symbol and then there is a space in between the symbol and the number.

@brianteeman
Copy link
Contributor

But the options are missing the "symbol" value.

Thats what I meant

@TLWebdesign
Copy link
Contributor Author

But the options are missing the "symbol" value.

Thats what I meant

Yes thank you i overlooked that until richard pointed it out. i fixed it now :D thanks for noticing. Still much to learn.

@richard67
Copy link
Member

But the options are missing the "symbol" value.

Thats what I meant

@brianteeman For new installations it has been fixed meanwhile in the base.sql. I think it does not need a new update SQL for updated sites. FOr these we still have the right PHP default.

@LadySolveig
Copy link
Contributor

I have tested this item ✅ successfully on cb652ce


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46433.

@richard67
Copy link
Member

Tested 9319e04 successfully.

@lemuelvdm Please mark your test result in the issue tracker here https://issues.joomla.org/tracker/joomla-cms/46433 by using the blue "Test this" button at the top left corner, selecting your test result and finally submit, so the test is properly counted. Thanks in advance.

@lemuelvdm
Copy link

I have tested this item ✅ successfully on cb652ce

Tested Successfully. 9319e04ad Fix works as expected.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46433.

@richard67
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46433.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 10, 2025
@Bodge-IT Bodge-IT added this to the Joomla! 6.0.1 milestone Nov 10, 2025
@Bodge-IT Bodge-IT merged commit 9221077 into joomla:6.0-dev Nov 10, 2025
42 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 10, 2025
@Bodge-IT
Copy link
Contributor

Thanks for the fix @TLWebdesign and to @LadySolveig & @lemuelvdm for testing at short notice!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants