ActiveRecord::RecordNotFound exception raised
Couldn't find Post with 'id'=57040
app/controllers/posts_controller.rb:26:in `show'
:o?
(The post with that id was apparantly undeleted just now).
Posted under General
This topic has been locked.
Deviant source display seems to be broken.
The source of post #2708082 is http://img07.deviantart.net/e4ba/i/2017/119/2/3/lethargic_friends_by_misumi_illustration-db7ibsi.jpg and is shown as http://misumi_illustration.deviantart.com/gallery/#/db7ibsi in the sidebar. The underscore in “misumi_illustration” in the hostname is wrong and should be a dash instead. It’s correct in the image URL, though. Not sure what’s up with the “gallery” and “#” either. Even when using a dash instead of the underscore in the link, it just takes me to the artist’s Deviant gallery, not the image.
kittey said:
Deviant source display seems to be broken.
The source of post #2708082 is http://img07.deviantart.net/e4ba/i/2017/119/2/3/lethargic_friends_by_misumi_illustration-db7ibsi.jpg and is shown as http://misumi_illustration.deviantart.com/gallery/#/db7ibsi in the sidebar. The underscore in “misumi_illustration” in the hostname is wrong and should be a dash instead. It’s correct in the image URL, though. Not sure what’s up with the “gallery” and “#” either. Even when using a dash instead of the underscore in the link, it just takes me to the artist’s Deviant gallery, not the image.
The # DeviantArt link you provided above works for me.
Also, the subdomain for the URL doesn't matter. The thing that really matters is the identifier at the end, which is a Base36 encoded number which matches the deviation ID. To illustrate that the subdomain doesn't matter, the following link also takes me to the same page.
BrokenEagle98 said:
Also, the subdomain for the URL doesn't matter. The thing that really matters is the identifier at the end, which is a Base36 encoded number which matches the deviation ID. To illustrate that the subdomain doesn't matter, the following link also takes me to the same page.
... it takes me to the gallery of the user “doesnotexist”, which, despite its name, does actually exist.
Well, if you have Javascript enabled, you get redirected to the correct image page. I still find that wrong hostname and the gallery link confusing, though.
Hmm... don't know what's going on there... ¯\_(ツ)_/¯
Both of the above links do take me to the correct URL.
However, I just tested it from my Python shell with no user credentials and it does pull up the doesnotexist gallery like you said.
Maybe you have to be logged in for it to work...?
Nope, I just tried it from IE where I'm not logged in and it still redirected me...
Maybe it's a Javascript thing that redirects to the right location...? Do you have Javascript disabled on Deviantart perchance?
Looks like that's it. The # after gallery tells it to redirect. The following is the Javascript code that gets run.
<script type="text/javascript">var d=(window.location.hash||"").match(/^#\/d([a-z0-9]+)$/);d&&(window.location=document.location.protocol+"//www.deviantart.com/deviation/"+parseInt(d[1],36));</script>
The URL in the above code http://www.deviantart.com/deviation/DEVIATIONID is what redirects to the correct location. I remember using that when I developed my Image-Sample detecting script.
Updated
Angled brackets in artist commentaries don’t show up properly. > shows up as >
See commentary in post #2708919, for example.
(BrokenEagle98: Yes, I have Javascript disabled by default via uMatrix.)
kittey said:
Angled brackets in artist commentaries don’t show up properly. > shows up as >
See commentary in post #2708919, for example.
To add onto what kittey said, I've sometimes noticed the same happening with ampersands, where it shows up as & instead.
Example: post #2709036, post #2707649, post #2707176
Also, getting back to the DeviantArt topic for a bit, would it be better if Danbooru displayed the redirect links instead, rather than relying on a Javascript functionality from DeviantArt?
So instead of the # gallery links, it would show something similar to the following.
http://www.deviantart.com/deviation/677740338
One pro to the above is that there would no longer be decode errors where an underscore should be a dash instead.
One con to the above is that not all DeviantArt image urls have a deviation Base36 ID attached to the end, though these are typically much older posts.
Updated
provence. said:
ActiveRecord::RecordNotFound exception raised
Couldn't find Post with 'id'=57040
app/controllers/posts_controller.rb:26:in `show':o?
(The post with that id was apparantly undeleted just now).
issue #3013. Approving deleted posts using the mode menu or with shift+O logs the wrong thing as the post id in /mod_actions.
kittey said:
Angled brackets in artist commentaries don’t show up properly. > shows up as >
See commentary in post #2708919, for example.
I see what's happening here. There are several problems:
BrokenEagle98 said:
Also, getting back to the DeviantArt topic for a bit, would it be better if Danbooru displayed the redirect links instead, rather than relying on a Javascript functionality from DeviantArt?
So instead of the # gallery links, it would show something similar to the following.
http://www.deviantart.com/deviation/677740338
One pro to the above is that there would no longer be decode errors where an underscore should be a dash instead.
One con to the above is that not all DeviantArt image urls have a deviation Base36 ID attached to the end, though these are typically much older posts.
Yes, I think it would be better to use http://www.deviantart.com/deviation/677740338 or even http://misumi-illustration.deviantart.com/art/Lethargic-friends-677740338, since the title doesn't affect anything either. kittey isn't the first person I've seen say that the javascript redirect doesn't work for them.
For urls that don't have a base36 id, there's nothing we can do with them either way, so there's no downside compared to what we're doing now. I think the only reason we use the current method is simply that it wasn't known at the time how to decode the base36 id or that http://www.deviantart.com/deviation/677740338 existed.
Full changelog: https://github.com/r888888888/danbooru/compare/production-2017.04.28-003610-utc...production-2017.05.02-010113-utc
I have some feedback on the Domain listing for artist entries.
For non-URLs, it just displays a ":" followed by the number of these posts. This is confusing. Instead, it would be better to prepend them with a standard text string, like "(Other)".
For that matter, can "(Other)" be broken down even further into "(Blank)", that is, any posts without a source.
So, the display instead would be...
Domains
list.of.urls: 123
...
...
(Other): 23
(Blank): 12
Thoughts?
https://danbooru.donmai.us/artists/54484
For me, it displays
Addressable::URI::InvalidURIError exception raised
Invalid scheme format: Kantai Collection - Comic à la Carte
app/models/artist.rb:111:in `block in domains'
app/models/artist.rb:111:in `map'
app/models/artist.rb:111:in `domains'
app/views/artists/show.html.erb:31:in `_app_views_artists_show_html_erb__3819655278528027546_70021876393000'
app/controllers/artists_controller.rb:58:in `show'
Seen the fix for mobile. It works for the notes, but now the top menu (the one you open with that blue thing beside the site's name) is behind everything else. So you can't click on parts of it.
In posts it's like this - https://my.mixtape.moe/klsxqi.png
In the pools section it's even worse, can't click on almost anything. Also the input fields are larger than the rest of the page - https://my.mixtape.moe/iuhewy.png
Thank you for your efforts by the way.
evazion said:
I see what's happening here. There are several problems:
- In the case of Twitter, their API seems to return escaped HTML. ">" is literally what they gave us. So for Twitter we need to unescape the HTML to undo this.
What are the security implications of that? We don’t want to allow HTML injection.
If the Twitter API gives us escaped HTML, shouldn’t we just be able to use that? >
is already fine; we just don’t have to escape it to &gt;
.
kittey said:
What are the security implications of that? We don’t want to allow HTML injection.
If the Twitter API gives us escaped HTML, shouldn’t we just be able to use that?
>
is already fine; we just don’t have to escape it to&gt;
.
Using "escaped by other party" data verbatim is probably less safe than unescaping and re-escaping. We don't have any control over it and therefore should never trust it to be escaped properly.
Type-kun said:
Using "escaped by other party" data verbatim is probably less safe than unescaping and re-escaping. We don't have any control over it and therefore should never trust it to be escaped properly.
Right, I got the order wrong. Taking the likely escaped verbatim data, escaping it again and then unescaping that is useless. It should be the the other way around.
https://danbooru.donmai.us/artists/4845
"Invalid scheme format: (C76) [Clesta (Cle Masahiro)] CL-orz"
API looks even worse, giving massive backtrace: https://defuse.ca/b/wcnIEzE4rjYFvVEH6eKAJH