WordPress.org

Ready to get started?Download WordPress

Forums

Currently Reading Book
[resolved] ISBN doesn't save - No display book (8 posts)

  1. jokamax
    Member
    Posted 1 year ago #

    Hi,

    Impossible to make work the plugin/widget.
    I try with fill ISBN with :
    9782820500359
    9782811206932
    9782811206918

    When I press Update Options, I obtain => Settings updated.
    But ISBN is empty ... and nothing in the widget.

    Can you help me ?
    I use version 1.2 of the plugin and wordpress 3.5

    Jonathan

    http://wordpress.org/extend/plugins/currently-reading-book/

  2. Boštjan Cigan
    Member
    Plugin Author

    Posted 1 year ago #

    If anyone of you knows how can I subscribe to these forums whenever one of you submits a new bug, I'd be grateful ... :D

    I'm checking it out now ...

  3. Boštjan Cigan
    Member
    Plugin Author

    Posted 1 year ago #

    It looks like the books aren't in Google's public API. So I can't help you with this, sorry.

  4. Catalin Cimpanu
    Member
    Posted 1 year ago #

    That's not the fix....

    I have tried a valid ISBN against the Google Books API
    http://www.google.com/books/feeds/volumes/?q=9781559351201

    9781559351201 = Lord of the Rings, and it validated against the API.

    The same issue is still valid. The problem is that the ISBN is not saved in the database at all. After you hit save, the ISBN field is reset.

    Tested on WP 3.4.2 and 3.5 as well.

  5. Boštjan Cigan
    Member
    Plugin Author

    Posted 1 year ago #

    I'm looking into it!

  6. Boštjan Cigan
    Member
    Plugin Author

    Posted 1 year ago #

    @Catalin Cimpanu

    Yes the book is shown in that search, but if you call the public API with the ISBN number:

    https://www.googleapis.com/books/v1/volumes?q=9781559351201

    I only get

    {
     "kind": "books#volumes",
     "totalItems": 0
    }

    as a response. And I don't know of any other way to get a book from the Google Books API.

    If you try other ISBNs (completely random):

    9781133776574
    9780307588364

    ...

    These show a valid response in the form of:

    {
     "kind": "books#volumes",
     "totalItems": 1,
     "items": [
      {
       "kind": "books#volume",
       "id": "sjDx3DlNveQC",
       "etag": "jbU3za75vs0",
       "selfLink": "https://www.googleapis.com/books/v1/volumes/sjDx3DlNveQC",
       "volumeInfo": {
        "title": "Gone Girl",
        "authors": [
         "Gillian Flynn"
        ],
        "publisher": "Crown Pub",
        "publishedDate": "2012-06-05",
        "description": "When a beautiful woman goes missing on her fifth wedding anniversary, her diary reveals hidden turmoil in her marriage and a mysterious illness; while her husband, desperate to clear himself of suspicion, realizes that something more disturbing than murder may have occurred. By the best-selling author of Dark Places. 70,000 first printing.",
        "industryIdentifiers": [
         {
          "type": "ISBN_10",
          "identifier": "030758836X"
         },
         {
          "type": "ISBN_13",
          "identifier": "9780307588364"
         }
        ],
        "pageCount": 419,
        "printType": "BOOK",
        "averageRating": 3.5,
        "ratingsCount": 306,
        "contentVersion": "preview-1.0.0",
        "imageLinks": {
         "smallThumbnail": "http://bks1.books.google.com/books?id=sjDx3DlNveQC&printsec=frontcover&img=1&zoom=5&source=gbs_api",
         "thumbnail": "http://bks1.books.google.com/books?id=sjDx3DlNveQC&printsec=frontcover&img=1&zoom=1&source=gbs_api"
        },
        "language": "en",
        "previewLink": "http://books.google.com/books?id=sjDx3DlNveQC&dq=9780307588364&hl=&cd=1&source=gbs_api",
        "infoLink": "http://books.google.com/books?id=sjDx3DlNveQC&dq=9780307588364&hl=&source=gbs_api",
        "canonicalVolumeLink": "http://books.google.com/books/about/Gone_Girl.html?hl=&id=sjDx3DlNveQC"
       },
       "saleInfo": {
        "country": "SI",
        "saleability": "NOT_FOR_SALE",
        "isEbook": false
       },
       "accessInfo": {
        "country": "SI",
        "viewability": "NO_PAGES",
        "embeddable": false,
        "publicDomain": false,
        "textToSpeechPermission": "ALLOWED",
        "epub": {
         "isAvailable": false
        },
        "pdf": {
         "isAvailable": false
        },
        "webReaderLink": "http://books.google.com/books/reader?id=sjDx3DlNveQC&hl=&printsec=frontcover&output=reader&source=gbs_api",
        "accessViewStatus": "NONE"
       },
       "searchInfo": {
        "textSnippet": "When a beautiful woman goes missing on her fifth wedding anniversary, her diary reveals hidden turmoil in her marriage and a mysterious illness; while her husband, desperate to clear himself of suspicion, realizes that something more ..."
       }
      }
     ]
    }

    So I don't know a way around this, except another version of the book with a different ISBN. The values are saved in the database only if the response is valid. So the problem isn't in the code itself.

  7. Boštjan Cigan
    Member
    Plugin Author

    Posted 1 year ago #

    I'll add openlibrary.org's API as a failsafe in case the Google Books API fails. The openlibrary.org API finds the books you are looking for.

    Will apply the fix soon as version 1.2.1!

    Cheers.

    http://openlibrary.org/api/books?bibkeys=ISBN:9781559351201&jscmd=details&format=json

    {"ISBN:9781559351201": {"info_url": "http://openlibrary.org/books/OL8610140M/The_Lord_of_the_Rings_(Mind's_Eye_Version)", "bib_key": "ISBN:9781559351201", "preview_url": "http://openlibrary.org/books/OL8610140M/The_Lord_of_the_Rings_(Mind's_Eye_Version)", "thumbnail_url": "http://covers.openlibrary.org/b/id/786366-S.jpg", "details": {"publishers": ["Soundelux Audio Publishing"], "physical_format": "Audio CD", "key": "/books/OL8610140M", "weight": "2.6 pounds", "title": "The Lord of the Rings (Mind's Eye Version)", "identifiers": {"goodreads": ["899772"], "librarything": ["1386651"]}, "isbn_13": ["9781559351201"], "covers": [786366], "created": {"type": "/type/datetime", "value": "2008-04-30T08:14:56.482104"}, "languages": [{"key": "/languages/eng"}], "isbn_10": ["1559351209"], "latest_revision": 7, "last_modified": {"type": "/type/datetime", "value": "2011-04-28T07:44:37.722015"}, "authors": [{"name": "J. R. R. Tolkien", "key": "/authors/OL26320A"}], "publish_date": "June 1994", "oclc_numbers": ["39032585"], "works": [{"key": "/works/OL14933436W"}], "type": {"key": "/type/edition"}, "subjects": ["Classics", "Fantasy - Epic", "Fantasy - Series", "Fantasy", "Abridged Audio - Fiction/Science Fiction & Fantasy", "Audio - Science Fiction / Fantasy", "Audio Adult: Books On Tape"], "physical_dimensions": "6.2 x 5.8 x 4.2 inches", "revision": 7}, "preview": "noview"}}

  8. Boštjan Cigan
    Member
    Plugin Author

    Posted 1 year ago #

    The issue is now fixed.

    If a book is not in the Google Books or OpenLibrary APIs an error message is shown.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic