[Skip to main content](#vessel-content)

#   Possible Bug in Field Class

##

- **[Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")**
- [![Ed&#95;Hika's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile") Topic Author
- [ Offline](/forum/user/33922-ed-hika)

Less More

- Posts: 109
- Thank you received: 5
-
-

11 years 9 months ago [\#189220](#189220) by [Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")  *[Possible Bug in Field Class](/forum/33-customers/874715-possible-bug-in-field-class#189220 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, there.  Good evening!  The seems to be a bug in /administrator/components/com&#95;hikashop/classes/field.php in the getFieldName function.  Instead of the current code,  the code should be  This will allow the asterisks next to mandatory field labels to appear correctly.  Setting the default value of $requiredDisplay to true (instead of false) is in line with the function display (in the classes/field.php file).  If you agree that this is a bug, please could you correct for the next version?  Thanks.  Take care!")* was created by *[Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")*

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6

Hello, there.

Good evening!

The seems to be a bug in /administrator/components/com_hikashop/classes/field.php in the getFieldName function.

Instead of the current code,
Code:

function getFieldName($field,$requiredDisplay = false){

the code should be Code:

function getFieldName($field,$requiredDisplay = true){

This will allow the asterisks next to mandatory field labels to appear correctly.

Setting the default value of $requiredDisplay to true (instead of false) is in line with the function display (in the classes/field.php file).

If you agree that this is a bug, please could you correct for the next version?

Thanks.

Take care!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzQ3MTUtcG9zc2libGUtYnVnLWluLWZpZWxkLWNsYXNzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

11 years 9 months ago [\#189236](#189236) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Possible Bug in Field Class](/forum/33-customers/874715-possible-bug-in-field-class#189236 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, there.  Good evening!  The seems to be a bug in /administrator/components/com&#95;hikashop/classes/field.php in the getFieldName function.  Instead of the current code,  the code should be  This will allow the asterisks next to mandatory field labels to appear correctly.  Setting the default value of $requiredDisplay to true (instead of false) is in line with the function display (in the classes/field.php file).  If you agree that this is a bug, please could you correct for the next version?  Thanks.  Take care!")*

Hi,

I'm sorry but I have to disagree.
It will break the compatibility with overrides, current display and other extensions.
It is also a partial fix ; because you will have two asterisks in the page because the display function have also the required display parameter.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzQ3MTUtcG9zc2libGUtYnVnLWluLWZpZWxkLWNsYXNzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")**
- [![Ed&#95;Hika's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile") Topic Author
- [ Offline](/forum/user/33922-ed-hika)

Less More

- Posts: 109
- Thank you received: 5
-
-

11 years 9 months ago [\#189470](#189470) by [Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")  Replied by *[Ed\_Hika](/forum/user/33922-ed-hika "View Ed&#95;Hika's Profile")* on topic *[Possible Bug in Field Class](/forum/33-customers/874715-possible-bug-in-field-class#189470 "-- HikaShop version -- : 2.3.4 -- Joomla version -- : 3.3.6  Hello, there.  Good evening!  The seems to be a bug in /administrator/components/com&#95;hikashop/classes/field.php in the getFieldName function.  Instead of the current code,  the code should be  This will allow the asterisks next to mandatory field labels to appear correctly.  Setting the default value of $requiredDisplay to true (instead of false) is in line with the function display (in the classes/field.php file).  If you agree that this is a bug, please could you correct for the next version?  Thanks.  Take care!")*

Thanks, Jerome.

I changed the code and it didn't break anything.

The double asterisks is easily fixed with a change in the CSS to hide the asterisk next to the input field. For most of the sites I have seen, the mandatory asterisks are displayed next to labels and not the input fields. As it stands, to display the asterisks next to labels, Hikashop will have to change either the default value as described below or to pass in a default of true from the views (which Hikashop is currently not doing). I.e. it appears that Hikashop doesn't currently display mandatory asterisks next to labels.

Take care!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMzLWN1c3RvbWVycy84NzQ3MTUtcG9zc2libGUtYnVnLWluLWZpZWxkLWNsYXNzP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
