HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Possible catalogue field types bug with radio button yes/no and date picker

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#52723 (In Topic #11470)
Avatar

Fan in action

Date picker results overridden on edit and button changes not registered

Hi,

Did a search on the above but couldn't find anything.

I have some custom catalogue fields. Two are causing me problems, not sure if these are bugs or if they are where or how to fix them.

Date picker
Date picker dropdown seems to include dates going back to the 1800s. This I can live with but maybe it indicates a problem with my setup is why I mention it.
Problem is enter a date. Date is fine and I can read it. Go into edit and date is automatically reset to August 1st 1970. This presents a major problem with editing for me.

Radio select yes/no
I want to have a field in the admin for a simple logic check. This seems to be permanently set to "yes". Change to no, save, read result and it is still yes.

Any thoughts/solutions appreciated.

Thanks,

Andrew
Back to the top
 
Posted
Rating:
#52724
Avatar

Fan in action

date picker description amend

Sorry, in previous description I meant to say it changes date to 1st of January 1970 rather than August if that makes any difference.
Back to the top
 
Posted
Rating:
#52725
Avatar

This fixes the date bug in 4.1.x:
Attachment
sources/hooks/modules/catalogue_fields/date.php (4.1.x)
» Download: date.php (4 Kb, 112 downloads so far)


However, I think you may be running the 4.2.x beta, as 4.1.x doesn't have a radio button option for catalogues. Is this the case?

This is the same fix for 4.2.x (untested):
Attachment
sources/hooks/modules/catalogue_fields/date.php (4.2.x)
» Download: date.php (4 Kb, 107 downloads so far)


And this is the radio button file for 4.2.x for which I think we may have already fixed the problem for the next beta, but I'm not sure:
Attachment
sources/hooks/modules/catalogue_fields/radiolist.php (4.2.x)
» Download: radiolist.php (4 Kb, 111 downloads so far)



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#52726
Avatar

Fan in action

Hi Chris,

Thanks for the date fix, will test it shortly.

My bad on the radio button, I meant to say "Checkbox"…apologies

…running on 4.1.10

Cheers,

Andrew
Back to the top
 
Posted
Rating:
#52727
Avatar

Second problem confirmed. Specifically, the bug is that you cannot edit a tickbox (checkbox) to be unticked (unchecked) if it was ticked (checked) initially.

Fix…
Attachment
sources/hooks/modules/catalogue_fields/tick.php
» Download: tick.php (4 Kb, 133 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#52733
Avatar

Fan in action

super…cheers…thought it was just me going crazy there for a while  ;)
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: