Skip to Content.
Sympa Menu

cc-devel - [cc-devel] [ cctools-Bugs-2767611 ] jswidget interferes with form elements in Opera for Mac

cc-devel AT lists.ibiblio.org

Subject: Developer discussion for Creative Commons technology and tools

List archive

Chronological Thread  
  • From: "SourceForge.net" <noreply AT sourceforge.net>
  • To: noreply AT sourceforge.net
  • Subject: [cc-devel] [ cctools-Bugs-2767611 ] jswidget interferes with form elements in Opera for Mac
  • Date: Fri, 01 May 2009 07:05:10 +0000

Bugs item #2767611, was opened at 2009-04-15 22:38
Message generated for change (Comment added) made by jhorigan
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=559966&aid=2767611&group_id=80503

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: John Horigan (jhorigan)
Assigned to: Nobody/Anonymous (nobody)
Summary: jswidget interferes with form elements in Opera for Mac

Initial Comment:
When jswidget is embedded in a form and the form is submitted from the Opera
browser

----------------------------------------------------------------------

>Comment By: John Horigan (jhorigan)
Date: 2009-05-01 00:05

Message:
A patch for this bug has been accepted for next version of LicenseChooser

----------------------------------------------------------------------

Comment By: John Horigan (jhorigan)
Date: 2009-04-17 00:19

Message:
I examined the DOM tree of my html form with an embedded jswidget and it
looked very strange. So I created a version of my form html file with the
script tag replaced by the contents of the template.html file. I ran this
html file through the W3C HTML validator and it found several errors. So I
fixed these errors and made corresponding changes to template.html. Then I
rebuilt jswidget and used my local copy of jswidget in the html form. The
buggy behavior in Opera went away with my modified version of jswidget.
This version of jswidget also fixed the behavior seen in bug
2349613 "jswidget not adding field info to forms in Safari & Firefox".

I have attached my modified version of template.html. It has two change
with respect to the 0.96 version of template.html:
1) The span tag that contains the entire widget is changed to a div tag
because it is illegal html for spans to contain divs.
2) The results container was changed from a form to a p because when the
widget is embedded in a form (as it must because it contains form input
elements), it is illegal html for the contents of a form tag to contain
another form. So the line that reads:
<form id="cc_js_cc_js_result_storage">
was changed to:
<p style="display: none;" id="cc_js_cc_js_result_storage">

I don't know how significant the span vs. div change is but putting the
results storage inside a form seems to really confuse Safari, Firefox, and
Opera. Why is the results storage inside a form?




----------------------------------------------------------------------

Comment By: John Horigan (jhorigan)
Date: 2009-04-15 22:56

Message:
argh! didn't realize that you have to attach files later. Anyway...

When jswidget is embedded in a form and the form is submitted from the
Opera browser some hidden form inputs fail to be included with the form
data set. When the attached html file is submitted I have modified the PHP
file to dump the $_POST variable. Here are the results:

array(13) { ["title"]=> string(13) "wooooooo.cfdg" ["compression"]=>
string(5) "PNG-8" ["variation"]=> string(3) "JVQ" ["notes"]=> string(0) ""
["cc_js_want_cc_license"]=> string(4) "sure" ["cc_js_share"]=> string(1)
"1" ["cc_js_remix"]=> string(0) "" ["cc_js_nc"]=> string(0) ""
["cc_js_sa"]=> string(0) "" ["cc_js_jurisdiction"]=> string(2) "us"
["cc_js_result_uri"]=> string(52)
"http://creativecommons.org/licenses/by-nc-sa/3.0/us/";
["cc_js_result_img"]=> string(56)
"http://i.creativecommons.org/l/by-nc-sa/3.0/us/88x31.png";
["cc_js_result_name"]=> string(71) "Creative Commons
Attribution-NonCommercial-ShareAlike 3.0 United States" }
Warning: Cannot modify header information - headers already sent by
(output started at /Users/john/Sites/cfa/gallery/upload.php:182) in
/Users/john/Sites/cfa/gallery/upload.php on line 599

The post data set does not contain any of the four hidden input elements
(id, ccuri, ccname, and ccicon). The submit button is also missing from the
form data set.

If I modify the html so that the script tag for jswidget points to a
nonexistent domain (causing jswidget to not load) then this is what the
$_POST variable looks like from PHP:

array(9) { ["title"]=> string(13) "wooooooo.cfdg" ["compression"]=>
string(5) "PNG-8" ["variation"]=> string(3) "JVQ" ["notes"]=> string(0) ""
["ccuri"]=> string(0) "" ["ccname"]=> string(0) "" ["ccicon"]=> string(0)
"" ["id"]=> string(3) "618" ["submit"]=> string(7) "Update!" }
Warning: Cannot modify header information - headers already sent by
(output started at /Users/john/Sites/cfa/gallery/upload.php:182) in
/Users/john/Sites/cfa/gallery/upload.php on line 599

The jswidget elements are, of course, missing, but the four hidden
elements and the submit button element are present. jswidget is somehow
causing Opera to not include hidden elements in the form data set that is
sent on form submission.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=559966&aid=2767611&group_id=80503



  • [cc-devel] [ cctools-Bugs-2767611 ] jswidget interferes with form elements in Opera for Mac, SourceForge.net, 05/01/2009

Archive powered by MHonArc 2.6.24.

Top of Page