{"id":48,"date":"2006-11-10T00:43:23","date_gmt":"2006-11-09T23:43:23","guid":{"rendered":"https:\/\/www.dont-panic.cc\/capi\/archives\/48"},"modified":"2007-10-03T15:08:49","modified_gmt":"2007-10-03T14:08:49","slug":"a-small-patch-for-scuttle","status":"publish","type":"post","link":"https:\/\/www.dont-panic.cc\/capi\/2006\/11\/10\/a-small-patch-for-scuttle\/","title":{"rendered":"A Small &#8220;Patch&#8221; for Scuttle"},"content":{"rendered":"<p>Yesterday I realized, that our internal office installation of <a href=\"http:\/\/www.scuttle.org\">Scuttle<\/a> (<a href=\"http:\/\/sourceforge.net\/projects\/scuttle\">SF project page<\/a>) suffered a minor bug: it kept on sorting all bookmarks by date, but in ascending order, i.e. the oldest bookmark was displayed first.<\/p>\n<p>After doing some research, I quickly found out that this seems to be a &#8220;<a href=\"http:\/\/bugs.mysql.com\/bug.php?id=815\">bug<\/a>&#8221; (well the devs say it isn&#8217;t but one can argue&#8230;) of MySQL, caused by an optimization of a <code>SELECT DISTINCT<\/code> queries.<\/p>\n<p><strike>So I patched <\/strike><code><strike>services\/bookmarkservice.php<\/strike><\/code><strike> and removed the <\/strike><code><strike>DISTINCT<\/strike><\/code><strike> keyword in the SQL-query of <\/strike><code><strike>getBookmarks()<\/strike><\/code><strike> (line 249, version 0.7.2).<\/strike><\/p>\n<p><strike>Up to now, I did not experience any duplicate lines caused by this. I think, I&#8217;m going to report this minor issue upstream.<\/strike><\/p>\n<p><strong>Update:<\/strong> hmm, ups, when searching, you will most certainly get duplicate results&#8230; I&#8217;ll check in the evening.<\/p>\n<p><strong>Update 2:<\/strong> Ok, so I wrote a litte more extensive patch, by wrapping the original <code>SELECT DISTINCT<\/code> statement as a subselect and ordering the result as such. This now really works. <strike>The patch for 0.7.2  can be downloaded <a href=\"https:\/\/www.dont-panic.cc\/capi\/files\/bookmarkservice.php.patch\" title=\"scuttle 0.7.2 Patch\">here<\/a>. You have to apply it to <code>services\/bookmarkservice.php<\/code>.<\/strike><\/p>\n<p><strong>Update 3:<\/strong> Ok, I somehow managed to delete the patch file. I am sorry. I will look if I can find it in any of the old backups, but I am not too convinced about this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I realized, that our internal office installation of Scuttle (SF project page) suffered a minor bug: it kept on sorting all bookmarks by date, but in ascending order, i.e. the oldest bookmark was displayed first. After doing some research, I quickly found out that this seems to be a &#8220;bug&#8221; (well the devs say &hellip; <a href=\"https:\/\/www.dont-panic.cc\/capi\/2006\/11\/10\/a-small-patch-for-scuttle\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;A Small &#8220;Patch&#8221; for Scuttle&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5],"tags":[45,106,105,226],"class_list":["post-48","post","type-post","status-publish","format-standard","hentry","category-internet","category-software","tag-bug","tag-patch","tag-scuttle","tag-software"],"_links":{"self":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":0,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dont-panic.cc\/capi\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}