If you try and change the title of a bookmark using the 'Save bookmark' command, it does not work if the old title has the same number of characters as the new title.
STEPS TO REPRODUCE
All steps are done using the Diigo API and the 'curl' command-line program. Results are viewed by refreshing "My Library" at diigo.com. Terminal transcript follows at the end of this message.
* Create a new bookmark by sending the 'Save bookmark' command via curl. * In web browser, refresh the "My Library" page.
Result: New bookmark appears as expected.
* Attempt to change the bookmark title by sending the same 'Save bookmark' command, except change the title= parameter to a new title with the same number of characters as the old title. * In web browser, refresh the "My Library" page.
Expected Result: Title of bookmark should change Actual Result: Title of bookmark remains the same
* Now try it one more time, except this time change the title= parameter to a longer name than the original.
* In web browser, refresh the "My Library" page.
Result: Now it works. Title of bookmark is changed as expected.
TRANSCRIPT
Following is the transcript of a session using the Terminal.app program in Mac OS X except that, of course, MY_APP_API_KEY and TEST_ACCOUNT_PASSWORD are placeholders. In this session, I created the bookmark with title "Test1", then tried to change it to "Hello", which did not work because both have 5 characters. I then tried to change it to "Hello World", which worked. Note that, in all 3 cases, Diigo sent an affirmative acknowledgement: {"message":"Saved 1 bookmark(s)","code":1}
The bug is worse than indicated in my original post. The new and old title character counts need not be equal for the update to fail. More generally, the update fails whenever the new title has fewer characters than the existing title.
SUMMARY
If you try and change the title of a bookmark using the 'Save bookmark' command, it does not work if the old title has the same number of characters as the new title.
STEPS TO REPRODUCE
All steps are done using the Diigo API and the 'curl' command-line program. Results are viewed by refreshing "My Library" at diigo.com. Terminal transcript follows at the end of this message.
* Create a new bookmark by sending the 'Save bookmark' command via curl.
* In web browser, refresh the "My Library" page.
Result: New bookmark appears as expected.
* Attempt to change the bookmark title by sending the same 'Save bookmark' command, except change the title= parameter to a new title with the same number of characters as the old title.
* In web browser, refresh the "My Library" page.
Expected Result: Title of bookmark should change
Actual Result: Title of bookmark remains the same
* Now try it one more time, except this time change the title= parameter to a longer name than the original.
* In web browser, refresh the "My Library" page.
Result: Now it works. Title of bookmark is changed as expected.
TRANSCRIPT
Following is the transcript of a session using the Terminal.app program in Mac OS X except that, of course, MY_APP_API_KEY and TEST_ACCOUNT_PASSWORD are placeholders. In this session, I created the bookmark with title "Test1", then tried to change it to "Hello", which did not work because both have 5 characters. I then tried to change it to "Hello World", which worked. Note that, in all 3 cases, Diigo sent an affirmative acknowledgement: {"message":"Saved 1 bookmark(s)","code":1}
MacMini2 jk$ curl -d "key=MY_APP_API_KEY&user=jerrysDiigoTest&title=Test1&url=http%3A%2F%2Fwww.test1.com%2F" -u jerrysDiigoTest:TEST_ACCOUNT_PASSWORD https://secure.diigo.com/api/v2/bookmarks
{"message":"Saved 1 bookmark(s)","code":1}MacMini2 jk$
MacMini2 jk$
MacMini2 jk$ curl -d "key=MY_APP_API_KEY&user=jerrysDiigoTest&title=Hello&url=http%3A%2F%2Fwww.test1.com%2F" -u jerrysDiigoTest:TEST_ACCOUNT_PASSWORD https://secure.diigo.com/api/v2/bookmarks
{"message":"Saved 1 bookmark(s)","code":1}MacMini2 jk$
MacMini2 jk$
MacMini2 jk$ curl -d "key=MY_APP_API_KEY&user=jerrysDiigoTest&title=Hello+World&url=http%3A%2F%2Fwww.test1.com%2F" -u jerrysDiigoTest:TEST_ACCOUNT_PASSWORD https://secure.diigo.com/api/v2/bookmarks
{"message":"Saved 1 bookmark(s)","code":1}MacMini2 jk$
The bug is worse than indicated in my original post. The new and old title character counts need not be equal for the update to fail. More generally, the update fails whenever the new title has fewer characters than the existing title.
To Top