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

#   Custom text Field is not working

##

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 10 months ago -  12 years 10 months ago [\#137215](#137215) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  *[Custom text Field is not working](/forum/3-bug-report/864458-custom-text-field-is-not-working#137215 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.2.3 Business -- Joomla version -- : 3.2.1 -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi i am having a problem whenever i try to use the custom field type &quot;custom text&quot; under product layout. It gives the following error Warning: Invalid argument supplied for foreach() in /home/xxxx/xxxxx/administrator/components/com&#95;hikashop/types/fields.php on line 134 customtext  Every other type of custom field works but this. How do i fix this? From what I can tell this seems to be a bug. I attached a screenshot for you. Also, I forgot to mention it seems to show every type of custom field after you save this type. I also attached a screenshot for this.  Thanks,  Josh")* was created by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")*

-- url of the page with the problem -- : [ mywebsite.com/mypage](http://mywebsite.com/mypage)
-- HikaShop version -- :2.2.3 Business
-- Joomla version -- : 3.2.1
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi i am having a problem whenever i try to use the custom field type "custom text" under product layout. It gives the following error
Warning: Invalid argument supplied for foreach() in /home/xxxx/xxxxx/administrator/components/com_hikashop/types/fields.php on line 134
customtext

Every other type of custom field works but this. How do i fix this? From what I can tell this seems to be a bug. I attached a screenshot for you. Also, I forgot to mention it seems to show every type of custom field after you save this type. I also attached a screenshot for this.

[ ![hf38c2cf.PNG](/forum/attachment/14351) ](/forum/attachment/14351 "hf38c2cf.PNG")

Thanks,

Josh

- [ ![hcde8d29.PNG](/forum/attachment/14350) ](/forum/attachment/14350 "hcde8d29.PNG") [ ](/forum/attachment/14350?download=1 "hcde8d29.PNG")
- [ ![hf38c2cf.PNG](/forum/attachment/14351) ](/forum/attachment/14351 "hf38c2cf.PNG") [ ](/forum/attachment/14351?download=1 "hf38c2cf.PNG")

Last edit: 12 years 10 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

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

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 10 months ago -  12 years 10 months ago [\#137223](#137223) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[Custom text Field is not working](/forum/3-bug-report/864458-custom-text-field-is-not-working#137223 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.2.3 Business -- Joomla version -- : 3.2.1 -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi i am having a problem whenever i try to use the custom field type &quot;custom text&quot; under product layout. It gives the following error Warning: Invalid argument supplied for foreach() in /home/xxxx/xxxxx/administrator/components/com&#95;hikashop/types/fields.php on line 134 customtext  Every other type of custom field works but this. How do i fix this? From what I can tell this seems to be a bug. I attached a screenshot for you. Also, I forgot to mention it seems to show every type of custom field after you save this type. I also attached a screenshot for this.  Thanks,  Josh")*

Another problem after upgrade to 2.2.3 the default values under my text fields are not showing up under my products on the admin.

Edit: Sorry this issue was just a caching issues it is working now.

Last edit: 12 years 10 months ago by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile").

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 10 months ago [\#137346](#137346) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Custom text Field is not working](/forum/3-bug-report/864458-custom-text-field-is-not-working#137346 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.2.3 Business -- Joomla version -- : 3.2.1 -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi i am having a problem whenever i try to use the custom field type &quot;custom text&quot; under product layout. It gives the following error Warning: Invalid argument supplied for foreach() in /home/xxxx/xxxxx/administrator/components/com&#95;hikashop/types/fields.php on line 134 customtext  Every other type of custom field works but this. How do i fix this? From what I can tell this seems to be a bug. I attached a screenshot for you. Also, I forgot to mention it seems to show every type of custom field after you save this type. I also attached a screenshot for this.  Thanks,  Josh")*

Hi,

Thanks to edit the file:
"administrator/components/com_hikashop/types/fields.php", function "addJS()" and add the following code at the top of the function after the "{": Code:

$this-&gt;load();

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

- **[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")**
- [![jschroeder's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13561-jschroeder "View jschroeder's Profile") Topic Author
- [ Offline](/forum/user/13561-jschroeder)

Less More

- Posts: 165
- Thank you received: 3
-
-

12 years 10 months ago [\#137401](#137401) by [jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")  Replied by *[jschroeder](/forum/user/13561-jschroeder "View jschroeder's Profile")* on topic *[Custom text Field is not working](/forum/3-bug-report/864458-custom-text-field-is-not-working#137401 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.2.3 Business -- Joomla version -- : 3.2.1 -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi i am having a problem whenever i try to use the custom field type &quot;custom text&quot; under product layout. It gives the following error Warning: Invalid argument supplied for foreach() in /home/xxxx/xxxxx/administrator/components/com&#95;hikashop/types/fields.php on line 134 customtext  Every other type of custom field works but this. How do i fix this? From what I can tell this seems to be a bug. I attached a screenshot for you. Also, I forgot to mention it seems to show every type of custom field after you save this type. I also attached a screenshot for this.  Thanks,  Josh")*

Hi thanks for the quick response. Where do in insert the code at in the file? What line?

Thanks,

Josh

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86564
- Thank you received: 14311
-
-

12 years 10 months ago [\#137524](#137524) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Custom text Field is not working](/forum/3-bug-report/864458-custom-text-field-is-not-working#137524 "-- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- :2.2.3 Business -- Joomla version -- : 3.2.1 -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message  Hi i am having a problem whenever i try to use the custom field type &quot;custom text&quot; under product layout. It gives the following error Warning: Invalid argument supplied for foreach() in /home/xxxx/xxxxx/administrator/components/com&#95;hikashop/types/fields.php on line 134 customtext  Every other type of custom field works but this. How do i fix this? From what I can tell this seems to be a bug. I attached a screenshot for you. Also, I forgot to mention it seems to show every type of custom field after you save this type. I also attached a screenshot for this.  Thanks,  Josh")*

As Xavier told you, it should be just after: Code:

function addJS(&amp;$requiredFields,&amp;$validMessages,$types=array()){

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjQ0NTgtY3VzdG9tLXRleHQtZmllbGQtaXMtbm90LXdvcmtpbmc/dG1wbD1tYXJrZG93bg==) 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.072 seconds

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