Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 66194
Status: rejected
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: rfrancis [...] ichr.uwa.edu.au
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: labelattributes misbehaves in checkbox_group
Date: Sat, 26 Feb 2011 17:32:14 +0800
To: bug-CGI.pm [...] rt.cpan.org
From: Richard Francis <rfrancis [...] ichr.uwa.edu.au>
Download (untitled) / with headers
text/plain 1.5k
Dear Sir/Madam, Many thanks for taking the time to look at this bug. I'm using: CGI version 3.52 Perl version 5.10.1 for x86_64 OS Fedora Core 13 2.6.33.6-147.2.4.fc13.x86_64 I assumed that in the context of a checkbox_group labelattributes would behave the same as attributes so as to be able to assign attributes to *specific* labels in a group. However using the code below I get ALL labels being given a hashref to display. #!/usr/bin/perl use strict; use CGI qw/:standard/; my $cgi = new CGI; print $cgi->header; print $cgi->start_html; my %labels = ( 'eenie'=>'first choice', 'meenie'=>'second choice', 'minie'=>'third choice'); my %labelattr = ('eenie'=> { 'class' => 'somecssclass' } ); my %attr = ('eenie'=> { 'class' => 'someothercssclass' } ); print $cgi->checkbox_group(-name => 'my_checkbox', -values => ['eenie','meenie','minie'], -labels => \%labels, -attributes => \%attr, -labelattributes => \%labelattr ); print $cgi->end_html; Regards, Richard Francis -- Mr Richard W Francis, MSc Senior Bioinformatician UWA Centre for Child Health Research Telethon Institute for Child Health Research University of Western Australia 100 Roberts Rd, Subiaco Perth WA 6008 Australia Email: rfrancis@ichr.uwa.edu.au Tel: +61-8-9489 7930 Fax: +61-8-9489 7700 ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal #####################################################################################
Download (untitled) / with headers
text/plain 240b
This issue has been copied to: https://github.com/leejo/CGI.pm/issues/82 please take all future correspondence there. This ticket will remain open but please do not reply here. This ticket will be closed when the github issue is dealt with.
Download (untitled) / with headers
text/plain 198b
Rejecting. I'm not accepting any feature requests, patches, or updates to the HTML generating functions of CGI.pm unless they are of a critical nature (i.e. fixing fundamentally broken HTML output).
Subject: RE: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group
Date: Sun, 13 Jul 2014 19:53:21 +0000
To: "bug-CGI [...] rt.cpan.org" <bug-CGI [...] rt.cpan.org>
From: Richard Francis <Richard.Francis [...] telethonkids.org.au>
Download (untitled) / with headers
text/plain 1.1k
Thanks Lee. Does this mean that this will never get fixed? Incidentally this bug does lead to broken HTML output. In the attached screenshot you'll see that in the page source, instead of the label for 'eenie' getting a particular CSS class, all labels get a hashref. This to me is broken. If it is likely to be a while before this is fixed then at least it might be good to note that labelattributes doesn't work in the documentation so that others don't try to use it. Thanks again for your time. Regards, Richard www.telethonkids.org.au 100 Roberts Road, Subiaco, Western Australia, 6008 PO Box 855, West Perth, Western Australia, 6872 Proudly supported by the people of Western Australia through Channel 7's Telethon Show quoted text
________________________________________ From: Lee Johnson via RT [bug-CGI@rt.cpan.org] Sent: 13 July 2014 19:47 To: Richard Francis Subject: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > Rejecting. I'm not accepting any feature requests, patches, or updates to the HTML generating functions of CGI.pm unless they are of a critical nature (i.e. fixing fundamentally broken HTML output).

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 1012b
On Sun Jul 13 15:53:45 2014, Richard.Francis@telethonkids.org.au wrote: Show quoted text
> Thanks Lee. > Does this mean that this will never get fixed?
Hi Richard, It's possible that this may be fixed in a later version, but i'm trying to set a precedent by rejecting all issues related to the HTML generation functions to wean users off them. I will be updating the perldoc in the next version to explain the state and future of the HTML generation functions. Show quoted text
> Incidentally this bug does lead to broken HTML output. In the attached > screenshot you'll see that in the page source, instead of the label > for 'eenie' getting a particular CSS class, all labels get a hashref. > This to me is broken.
If you can provide a fully tested patch i'm happy to apply it since the bug report was raised before i took over maintenance. However i won't be looking at this myself as i don't consider it broken in the sense that incorrect/invalid attribute values don't actually break the fundamental rendering of the page. Thanks! Lee.
Subject: Re: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group
Date: Sun, 13 Jul 2014 15:22:11 -0600
To: bug-CGI [...] rt.cpan.org
From: Stuart A Johnston <saj [...] thecommune.net>
Download (untitled) / with headers
text/plain 1.6k
Although I can see why you'd assume that labelattributes would take the same input as attributes, it is not designed that way and the documentation doesn't say it does. The docs could be clarified or examples added but this definitely is not a bug. On 07/13/2014 01:53 PM, Richard Francis via RT wrote: Show quoted text
> Queue: CGI > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > > > Thanks Lee. > Does this mean that this will never get fixed? > > Incidentally this bug does lead to broken HTML output. In the attached screenshot you'll see that in the page source, instead of the label for 'eenie' getting a particular CSS class, all labels get a hashref. This to me is broken. > > If it is likely to be a while before this is fixed then at least it might be good to note that labelattributes doesn't work in the documentation so that others don't try to use it. > > Thanks again for your time. > Regards, > Richard > > > www.telethonkids.org.au > > 100 Roberts Road, Subiaco, Western Australia, 6008 PO Box 855, West Perth, Western Australia, 6872 > > Proudly supported by the people of Western Australia through Channel 7's Telethon > > ________________________________________ > From: Lee Johnson via RT [bug-CGI@rt.cpan.org] > Sent: 13 July 2014 19:47 > To: Richard Francis > Subject: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group > > <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > > > Rejecting. I'm not accepting any feature requests, patches, or updates to the HTML generating functions of CGI.pm unless they are of a critical nature (i.e. fixing fundamentally broken HTML output). >
Subject: RE: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group
Date: Sun, 13 Jul 2014 21:58:02 +0000
To: "bug-CGI [...] rt.cpan.org" <bug-CGI [...] rt.cpan.org>
From: Richard Francis <Richard.Francis [...] telethonkids.org.au>
Download (untitled) / with headers
text/plain 2.4k
OK. Thanks for your time. Maybe some clarification and an example in the docs would be useful to distinguish between the labelattributes switch adding attributes to particular labels as I assumed (given the behaviour of the attributes switch) or all labels as it is actually designed to do. Other than that I'm happy if you want to close this query. Regards, Richard www.telethonkids.org.au 100 Roberts Road, Subiaco, Western Australia, 6008 PO Box 855, West Perth, Western Australia, 6872 Proudly supported by the people of Western Australia through Channel 7's Telethon Show quoted text
________________________________________ From: saj@thecommune.net via RT [bug-CGI@rt.cpan.org] Sent: 14 July 2014 05:22 To: Richard Francis Subject: Re: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > Although I can see why you'd assume that labelattributes would take the same input as attributes, it is not designed that way and the documentation doesn't say it does. The docs could be clarified or examples added but this definitely is not a bug. On 07/13/2014 01:53 PM, Richard Francis via RT wrote:
> Queue: CGI > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > > > Thanks Lee. > Does this mean that this will never get fixed? > > Incidentally this bug does lead to broken HTML output. In the attached screenshot you'll see that in the page source, instead of the label for 'eenie' getting a particular CSS class, all labels get a hashref. This to me is broken. > > If it is likely to be a while before this is fixed then at least it might be good to note that labelattributes doesn't work in the documentation so that others don't try to use it. > > Thanks again for your time. > Regards, > Richard > > > www.telethonkids.org.au > > 100 Roberts Road, Subiaco, Western Australia, 6008 PO Box 855, West Perth, Western Australia, 6872 > > Proudly supported by the people of Western Australia through Channel 7's Telethon > > ________________________________________ > From: Lee Johnson via RT [bug-CGI@rt.cpan.org] > Sent: 13 July 2014 19:47 > To: Richard Francis > Subject: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group > > <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > > > Rejecting. I'm not accepting any feature requests, patches, or updates to the HTML generating functions of CGI.pm unless they are of a critical nature (i.e. fixing fundamentally broken HTML output). >
Subject: RE: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group
Date: Mon, 14 Jul 2014 06:08:29 +0000
To: "bug-CGI [...] rt.cpan.org" <bug-CGI [...] rt.cpan.org>
From: Richard Francis <Richard.Francis [...] telethonkids.org.au>
Download (untitled) / with headers
text/plain 1.8k
Hi Lee, Just a follow on from your email. If you are still prepared to apply a simple patch then the one suggested here works well for me so that each label can be given a specific attribute. https://rtcpan.develooper.com/Public/Bug/Display.html?id=88451 However this does very slightly alter the behaviour as (very briefly) described in the docs. I'll leave it to you to decide if you wish to apply this. Kind regards, Richard www.telethonkids.org.au 100 Roberts Road, Subiaco, Western Australia, 6008 PO Box 855, West Perth, Western Australia, 6872 Proudly supported by the people of Western Australia through Channel 7's Telethon Show quoted text
________________________________________ From: Lee Johnson via RT [bug-CGI@rt.cpan.org] Sent: 14 July 2014 05:16 To: Richard Francis Subject: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > On Sun Jul 13 15:53:45 2014, Richard.Francis@telethonkids.org.au wrote:
> Thanks Lee. > Does this mean that this will never get fixed?
Hi Richard, It's possible that this may be fixed in a later version, but i'm trying to set a precedent by rejecting all issues related to the HTML generation functions to wean users off them. I will be updating the perldoc in the next version to explain the state and future of the HTML generation functions.
> Incidentally this bug does lead to broken HTML output. In the attached > screenshot you'll see that in the page source, instead of the label > for 'eenie' getting a particular CSS class, all labels get a hashref. > This to me is broken.
If you can provide a fully tested patch i'm happy to apply it since the bug report was raised before i took over maintenance. However i won't be looking at this myself as i don't consider it broken in the sense that incorrect/invalid attribute values don't actually break the fundamental rendering of the page. Thanks! Lee.
Subject: Re: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group
Date: Mon, 14 Jul 2014 10:32:51 -0600
To: bug-CGI [...] rt.cpan.org
From: Stuart A Johnston <saj [...] thecommune.net>
Download (untitled) / with headers
text/plain 2.3k
I don't think that patch correctly handles backwards compatibility, though I haven't tested. It would also need to be applied to all other functions with labelattributes and include tests. Probably a new option would be better to maintain compatibility rather than trying to overload the existing one. On 07/14/2014 12:09 AM, Richard Francis via RT wrote: Show quoted text
> Queue: CGI > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > > > Hi Lee, > > Just a follow on from your email. If you are still prepared to apply a simple patch then the one suggested here works well for me so that each label can be given a specific attribute. > > https://rtcpan.develooper.com/Public/Bug/Display.html?id=88451 > > However this does very slightly alter the behaviour as (very briefly) described in the docs. > I'll leave it to you to decide if you wish to apply this. > > Kind regards, > Richard > > > www.telethonkids.org.au > > 100 Roberts Road, Subiaco, Western Australia, 6008 PO Box 855, West Perth, Western Australia, 6872 > > Proudly supported by the people of Western Australia through Channel 7's Telethon > > ________________________________________ > From: Lee Johnson via RT [bug-CGI@rt.cpan.org] > Sent: 14 July 2014 05:16 > To: Richard Francis > Subject: [rt.cpan.org #66194] labelattributes misbehaves in checkbox_group > > <URL: https://rt.cpan.org/Ticket/Display.html?id=66194 > > > On Sun Jul 13 15:53:45 2014, Richard.Francis@telethonkids.org.au wrote:
>> Thanks Lee. >> Does this mean that this will never get fixed?
> > Hi Richard, > > It's possible that this may be fixed in a later version, but i'm trying to set a precedent by rejecting all issues related to the HTML generation functions to wean users off them. > > I will be updating the perldoc in the next version to explain the state and future of the HTML generation functions. >
>> Incidentally this bug does lead to broken HTML output. In the attached >> screenshot you'll see that in the page source, instead of the label >> for 'eenie' getting a particular CSS class, all labels get a hashref. >> This to me is broken.
> > If you can provide a fully tested patch i'm happy to apply it since the bug report was raised before i took over maintenance. However i won't be looking at this myself as i don't consider it broken in the sense that incorrect/invalid attribute values don't actually break the fundamental rendering of the page. > > Thanks! > Lee. >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.