Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[CLOSED] Published is saved as 1 whatever entered 27 Aug 2012 13:23 #3314

I think this needs to be corrected.

The situation is I'm using a published field in my component, and this field type is integer.
The field is displayed as radio buttons in the edit form, and whatever I choose 'Yes' or 'No', the saved value is 'Yes'

I looked into the code and found this in the check() function of the table"
if ($this->published == null)
			$this->published = 1;

I guessed that this is the problem because 0 is evaluated as null, and it worked correct when I changed it to:
if ($this->published === null)
			$this->published = 1;

Please Log in or Create an account to join the conversation.

Last edit: by admin.

Re: Published is saved as 1 whatever value entered 14 Oct 2012 20:39 #4498

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
This is fixed in V2.0
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.059 seconds

For starters it's just so easy to design an app in a way that I'm used to i.e. database first then views followed by customization. The fork system is pure brilliance from a developer standpoint as I can override things and still add and update my projects with minimal effort! Truly amazing to be able to build components in Joomla using incremental refinement without having to do everything by hand. Thanks for the great tool! I am so much more productive now than ever and I can't imagine building components any other way!!!!
Dave (Forum)

Get Started