creativecommons / creativecommons.org

Legacy legal code translations and general support issues
MIT License
154 stars 201 forks source link

CC0 Waiver looks bad #313

Closed mmoreshead closed 5 years ago

mmoreshead commented 8 years ago

A nice user sent me a message about some errors on the CC0 waiver page https://creativecommons.org/choose/zero/waiver
He says it says:

I have tried to use the CC0 Waiver site from two different browsers (Safari + Firerox) today and yetsterday, but it seems broken. In particular, the error message below appears above the last checkbox before the "Continue" button.

Server Error URL: https://licenses.productionwww.creativecommons.uk0.bigv.io/ccengine-fcgi/publicdomain/zero/1.0/legalcode-plain Module paste.exceptions.errormiddleware:142 in call

app_iter = self.application(environ, sr_checker) Module cc.engine.app:60 in call return controller(request)(environ, start_response) Module cc.engine.decorators:24 in new_controller_func return controller(request, license=license, _args, *_kwargs) Module cc.engine.licenses.views:191 in license_legalcode_plain_view license.uri + "legalcode", parser) Module lxml.etree:3427 in lxml.etree.parse (src/lxml/lxml.etree.c:79801) Module lxml.etree:1782 in lxml.etree._parseDocument (src/lxml/lxml.etree.c:115995) Module lxml.etree:1808 in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:116345) Module lxml.etree:1712 in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:115233) Module lxml.etree:1115 in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:109930) Module lxml.etree:573 in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:103404) Module lxml.etree:683 in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:105058) Module lxml.etree:611 in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:103924) IOError: Error reading file 'http://creativecommons.org/publicdomain/zero/1.0/legalcode': failed to load external entity "http://creativecommons.org/publicdomain/zero/1.0/legalcode" extra data

full traceback

text version Additionally an error occurred while sending the <paste.exceptions.reporter.LogReporter object at 0x7febb11501d0> report:

Traceback (most recent call last): File "/var/www/creativecommons.org/python_env/local/lib/python2.7/site-packages/paste/exceptions/errormiddleware.py", line 426, in send_report rep.report(exc_data) File "/var/www/creativecommons.org/python_env/local/lib/python2.7/site-packages/paste/exceptions/reporter.py", line 114, in report

mattl commented 8 years ago

Passing to Rob who's dealing with a couple different issues around the same thing right now.

mmoreshead commented 8 years ago

Turns out it's for you after all @robmyers - sorry :(

rheaplex commented 8 years ago

@mmoreshead no worries, thank you for setting this up.

@mattl there seems to be some css love needed on the waiver page ,although that may be related to this. Investigating.

mattl commented 8 years ago

It's not doing something stupid like looking for an HTTP resource, getting a 301 and not knowing what to do with it? Maybe can point it directly at HTTPS?

rheaplex commented 8 years ago

I'm just on this one. Will let you know.

rheaplex commented 8 years ago

It's looking for https but not finding that resource. Investigating.

rheaplex commented 8 years ago

OK we have a different error! :-)

@mattl remember when we tried to convert cc.engine to https before? We probably need to do that now.

mattl commented 8 years ago

Yeah. Let's work on that first thing Monday.

rheaplex commented 8 years ago

It is doing precisely that. The version of python-lxml we are using is not https aware.

See below for a fix-ish thing. I'll see where else this needs applying on Monday.

git diff cc.engine/cc/engine/licenses/views.py diff --git a/python_env/src/cc.engine/cc/engine/licenses/views.py b/python_env/src/cc.engine/cc/engine/licenses/views.py index 3676dd4..3c11b77 100644 --- a/python_env/src/cc.engine/cc/engine/licenses/views.py +++ b/python_env/src/cc.engine/cc/engine/licenses/views.py @@ -16,6 +16,13 @@ from cc.licenserdf.tools.license import license_rdf_filename from cc.i18n.util import locale_to_lower_upper

+from urllib2 import urlopen + +def fetch_https(uri):

@@ -188,7 +195,7 @@ def license_legalcode_view(request, license): def license_legalcode_plain_view(request, license): parser = etree.HTMLParser() legalcode = etree.parse(

spencerahill commented 8 years ago

Hi all. I'm the user that sent in the original bug report. Thank you for fixing the text box with the CC0 legal code.

However, the page still does not work, because the "Continue" button at the bottom of the page cannot be clicked. It appears as a light gray box with gray letters until I move my mouse over it, and then it becomes a larger gray box with white lettering, and it is unresponsive to clicks.

I responded to the help desk ticket with this message, but thought it might help to let you know here also. Thanks!

mattl commented 8 years ago

Thanks Spencer. We'll get this fixed.

mattl commented 8 years ago

@robmyers

rheaplex commented 8 years ago

@mattl this is at least in part a css problem.

mattl commented 8 years ago

Yeah, see also #300

rheaplex commented 8 years ago

Stylesheet loaded over http for https page. Fixing that then looking further.

rheaplex commented 8 years ago

cc.engine isn't adding our scripts block addition, contrast the current:

https://creativecommons.org/choose/zero/waiver

with:

https://web.archive.org/web/20160616052616/https://creativecommons.org/choose/zero/waiver

The missing block is from the (unchanged) template:

python_env/src/cc.engine/cc/engine/templates/chooser_pages/zero/waiver.html

I'm checking for syntax changes in the template engine.

mattl commented 8 years ago

added to repo

rheaplex commented 8 years ago

Thank you! That includes the JS.

The JS fails because jQuery isn't aliased to $. I'm going to think about that after lunch.

rheaplex commented 8 years ago

I've committed all the changes from this discussion to the repository and deployed them.

The button now works but is styled incorrectly, as are the buttons on the next page.

https://creativecommons.org/choose/zero/waiver

https://creativecommons.org/choose/zero/confirm

@mattl is this something I should ping AB about?

spencerahill commented 8 years ago

Hi all, I was just able to use the page successfully. Of course, carry on with the ongoing style issues, but from a user standpoint it is functional. Thanks for all your help!

mmoreshead commented 8 years ago

Another user says: It doesn’t really look fixed to me right now. I get a lot of xs on the page, the boxes seem to be in the wrong order and then when you click to continue you still get no possibility to confirm on the following page. I’m using firefox. Please see attached.
13007973589 13007973590

mattl commented 8 years ago

Yeah, it works, its just messy as hell now.

tomas-nz commented 8 years ago

Hi @mattl, I can see a different error stack on that page:

Server Error

URL: https://licenses.productionwww.creativecommons.uk0.bigv.io/ccengine-fcgi/publicdomain/zero/1.0/legalcode-plain
Module paste.exceptions.errormiddleware:142 in __call__
>>  app_iter = self.application(environ, sr_checker)
Module cc.engine.app:60 in __call__
>>  return controller(request)(environ, start_response)
Module cc.engine.decorators:24 in new_controller_func
>>  return controller(request, license=license, *args, **kwargs)
Module cc.engine.licenses.views:194 in license_legalcode_plain_view
>>  legalcode = etree.parse(fetch_https(license.uri + "legalcode"), parser)
Module cc.engine.licenses.views:21 in fetch_https
>>  return urlopen(https_uri)
Module urllib2:154 in urlopen
>>  return opener.open(url, data, timeout)
Module urllib2:437 in open
>>  response = meth(req, response)
Module urllib2:550 in http_response
>>  'http', request, response, code, msg, hdrs)
Module urllib2:475 in error
>>  return self._call_chain(*args)
Module urllib2:409 in _call_chain
>>  result = func(*args)
Module urllib2:558 in http_error_default
>>  raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
extra data

full traceback

text version

Apart from that, also both blue (i) images next to URL and territory just reload the page. I assume they should load some kind of help pop-up element etc. Below is a screenshot - tested on Firefox and Chromium (Linux Mint 17.3):

Screenshot

little-wow commented 8 years ago

Another user says it looks bad too: https://twitter.com/andrewrstine/status/771416061828706304

mmoreshead commented 8 years ago

@little-wow -- you can tell him that it still works, it's just a lot ugly and weird. Not ideal, I know.

rheaplex commented 8 years ago

Yes I'm loathe to spend too much time on this after fixing the functionality as it may be redesigned soon.

If it becomes a priority we can look at fixing the CSS, or ask someone to do so for us.

linguica commented 8 years ago

Hi, that was my tweet. I tried the tool on both Windows and Mac in a couple browsers and it didn't actually generate the HTML for the CC0 mark. It goes to the "confirm waiver" page and then there is no obvious way to do anything or view the result.

rheaplex commented 8 years ago

Ah yikes yes, the server error is current. I'm sorry about that. I shall investigate.

rheaplex commented 8 years ago

The 403 is correct, we shouldn't serve that path, but I need to see why the code thinks it wants that path. It looks like a regression but I'm not sure what's caused it.

rheaplex commented 8 years ago

Urgent but I won't be able to look until early next week at this point.

rheaplex commented 8 years ago

The inline deed now displays.

rheaplex commented 8 years ago

The confirmation problem is still there -

https://creativecommons.org/choose/zero/confirm?license-class=zero&name=&actor_href=&work_title=&work_jurisdiction=-&confirm=confirm&understand=confirm&lang=en_GB&field1=continue

I believe it's a CSS problem, I'm investigating.

little-wow commented 8 years ago

@robmyers got another comment about it. Thanks, Gary! https://twitter.com/GaryJ/status/780357936409407488

GaryJones commented 8 years ago

got another comment about it. Thanks, Gary!

No problem :-) Thanks for the direction to here.

GaryJones commented 8 years ago

re: Missing Buttons on Confirmation:

app.css currently has the following:

button, .button {
    background-color: transparent;
     ...
}

And nothing to add the black (or desired) background colour back in.

GaryJones commented 8 years ago

re: Broken Waiver page appearance:

The CSS issues on the Waiver page are due to requests for two CSS files from your static domain, via HTTPS, but the SSL cert there has recently expired (oops!):

screenshot 2016-09-26 14 47 16

The page also hits YUI (Yahoo!) via HTTPS, but that cert is not expired, but has another issue. You may need to pull their .css file locally for now (saves a domain lookup anyway).

rheaplex commented 8 years ago

@GaryJones Thank you for this! I think the CC0 chooser theme is still clashing with our new website theme and I'll need to modify the former slightly to play nice.

janetpkr commented 8 years ago

From related issue.. is this chooser where we would point folks to get CC0 metadata?

janetpkr commented 7 years ago

This is still broken. I'd like to be able to send platforms a snippet of code to include in pages where they display the CC0 icon on a resource.

Is this section sufficient for that, or would I have to add something to make it clear to the platform that they can also do this for CC0? https://creativecommons.org/platform/toolkit/#license-metadata

rheaplex commented 7 years ago

@janeatcc Yes this is where people would get CC0 metadata. The "Have your own website?" section of the completion page (that people can't get to because the buttons on the second page are hidden) contains a snippet of HTML+RDFa that people can use. There's two sizes of buttons the snippet can include, selectable at the top of the page.

Here's an example:

https://creativecommons.org/choose/zero/results?license-class=zero&name=A.+N.+Other&actor_href=https%3A%2F%2Fexample.net%2Fanother%2FUntitledPainting&work_title=Untitled+Painting&work_jurisdiction=GB&confirm=confirm&understand=confirm&lang=en_US&field1=continue&waiver-affirm=affirm

(The form requires the territory/jurisdiction field.)

The CCrel quide has a nice explanation a) of what the markup means and how to create it manually b) how to just use the CC0 chooser if you don't want to, I recommend linking it from any discussion of CC0 metadata:

https://labs.creativecommons.org/2011/ccrel-guide/#CC0

rheaplex commented 7 years ago

The HTML+RDFa representations of License and PD data are different, with different choosers and different tags, so they do need describing (briefly) separately.

janetpkr commented 7 years ago

Ok, so since the CC0 chooser is currently broken, is this page the best place to point platforms? Or should we wait until it's fixed so platforms can input their territory + jurisdiction? https://creativecommons.org/choose/zero/results?license-class=zero&name=A.+N.+Other&actor_href=https%3A%2F%2Fexample.net%2Fanother%2FUntitledPainting&work_title=Untitled+Painting&work_jurisdiction=GB&confirm=confirm&understand=confirm&lang=en_US&field1=continue&waiver-affirm=affirm

rheaplex commented 7 years ago

I can take a look at CC0 later this afternoon, or we could link to the CCrel guide and a tinyurl of that example?

janetpkr commented 7 years ago

No rush. I'll wait!

rheaplex commented 7 years ago

@janeatcc @mmoreshead I've fixed the formatting of the tool that was preventing people from being able to use it. The formatting of some text and input widgets has (incidentally) been updated along with the buttons - this isn't intended as a redesign but was desperately needed to make the tool more usable in its current form.

janetpkr commented 7 years ago

Ok - is the code on the resulting last page in good shape to send to folks?

On Thu, Oct 27, 2016 at 12:08 PM, Rob Myers notifications@github.com wrote:

@janeatcc https://github.com/janeatcc @mmoreshead https://github.com/mmoreshead I've fixed the formatting of the tool that was preventing people from being able to use it. The formatting of some text and input widgets has (incidentally) been updated along with the buttons - this isn't intended as a redesign but was desperately needed to make the tool more usable in its current form.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/creativecommons/creativecommons.org/issues/313#issuecomment-256739593, or mute the thread https://github.com/notifications/unsubscribe-auth/AGGTmcHo5_ndFwcSyj_rOSNtpoWSUHTmks5q4PadgaJpZM4I-CJp .

Jane Park Director of Platforms and Partnerships Creative Commons @janedaily

Get updates: http://bit.ly/commonsnews Invest in the commons: https://donate.creativecommons.org/

rheaplex commented 7 years ago

Yes, it is.

little-wow commented 5 years ago

Reopening and reassigning this issue because the chooser link is still broken. cc @TimidRobot @kgodey

accakks commented 5 years ago

@kgodey Is this issue assignable before GSoC begins? If so I'd like to give a try !

kgodey commented 5 years ago

Go ahead, I believe this is the repo/code it's served from: https://github.com/creativecommons/cc.engine/blob/master/cc/engine/templates/chooser_pages/zero/waiver.html. No one on the current tech team hasn't done much work on cc.engine so we may be slower to answer questions than for other projects.