New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting "General Terms of Use" longer than 1024 characters via API fails, resulting in "500 Internal Server Error" #2669
Comments
I see other possibilities than circumventing the action log:
|
@bencomp yes, these are excellent ideas. Another possibility:
When I said workaround I meant something that @shlake could do today with the version she's running (4.2). I'm seeing "COPY FROM copies data from a file to a table" at http://www.postgresql.org/docs/current/static/sql-copy.html ... might work? I don't know. This would be to get the contents of her file into the Once upon a time the |
The COPY command is for importing/exporting tabular data from/to files, so that wouldn't work. Unless it is critical to put the terms in place right now, I would advise to wait for a fix. Not writing settings changes to the action log goes defeats the purpose of the action log (which I initially called an "audit log"). From the service provider's point of view, keeping the terms in a version control system is essential, in case of an audit or a dispute. |
Hi all -- just wondering, is there any currently functional workaround for this issue, or is the only solution to place the ToC off-site with a link? Thanks!! |
@ajirnyi @shlake on my Mac, I just put the contents of the failing file (more that 1024 characters) in my copy/paste buffer from the terminal like this...
... (but there are other ways, of course) and used pgAdmin3 to create a new "name" in the "setting" tabled called ":ApplicationTermsOfUse" and pasted from my buffer into the "content" column like this: It seemed to work fine. It shows the content on sign up: Obviously this is not the most elegant workaround so if @scolapasta @kcondon @landreev or others have something better we can document for now, please do leave a comment. |
The character limit problem also shows up in setting (new as of 4.3) "DatasetPublishPopupCustomText". The following fails: But a shortened text string works. |
@shlake does the PgAdmin3 trick I mentioned at #2669 (comment) help? |
The work around we used was a regular SQL update command for each setting we couldn't get to work through the API (DatasetPublishPopupCustomText and ApplicationTermsOfUse). I wasn't the one to do it, if you need more info, I'll get it. Update setting
|
This is what we should do. Truncate it. |
That said, people don't seem to be complaining about this very much. Closing. |
Related: #4835 |
Related: pull request #5269. |
If you try to set the "General Terms of Use" using a file with more than 1024 characters as described at http://guides.dataverse.org/en/4.2.1/installation/installation-main.html#applicationtermsofuse like @shlake mentioned on the mailing list, it will fail with the following in the stack trace:
The reason for this is that writing a setting falls under "Log important events to an audit log" implemented in #1532 and the
actionlogrecord
table has a field called "info" that is limited to 1024 characters:Somehow we got more than 1024 characters in place at https://dataverse.harvard.edu but my guess is that it was a direct database write to the
setting
table to avoid writing to theactionlogrecord
table. This is a potential workaround that should be documented if it helps.I'm attaching a stack trace from a0bc225 which is the commit I was on when I reproduced the bug using the steps below. I'll also attach the file mentioned on the mailing list by @shlake that exercises the bug. (I'm appending ".txt" to the filename because GitHub doesn't support upload of HTML files.)
The text was updated successfully, but these errors were encountered: