webhook / webhook-cms

The CMS layer for Webhook.com
http://www.webhook.com
MIT License
178 stars 41 forks source link

Cannot read property 'get' of undefined #223

Open chasegiunta opened 9 years ago

chasegiunta commented 9 years ago

Client was having an issue where only one of the content items wasn't loading within the CMS, all the others of the same content type were rendering up fine.

Unfortunately he already deleted it and recreated it (I was going to leave it so you guys could take a look), but I managed to grab a screenshot of the console before he did... If this is unhelpful to nailing down what happened, go ahead and close the issue.

screen shot 2015-02-21 at 1 15 15 pm

maxlever commented 9 years ago

Getting the same error on my website (ronikdesign). The Swig templates render fine and load all the content I had previously entered in the CMS, and I can also edit the template, but I can't edit the content itself anymore. capture d ecran 2015-04-24 a 5 20 24 pm

budparr commented 9 years ago

I got the same 'Uncaught TypeError' error today. You can see in my grid field, "events" the offending null value. I haven't talked to the client yet, but I imagine they deleted a row in the grid.

 "-JjRQJVj0AJ0maJuGK0R": {
        "_sort_create_date": 1425332280,
        "_sort_last_updated": 1429802820,
        "_sort_publish_date": 1425332280,
        "country": "country -JironKiwTLnA4U9CQFU",
        "create_date": "2015-03-02T16:38:00-05:00",
        "events": [
          null,
          {
            "_sort_event_date": 1292389200,
            "description": "<p>\n\tThe Office of the Prosecutor made public a summonses to appear for Francis Kirimi Muthaura 15 December 2010.\n</p>",
            "event": "Summonses to Appear",
            "event_date": "2010-12-15T00:00:00-05:00",
            "related_case": "cases -JjSpTS_jC6rMwOOAz6g"
          }
        ],
        "image": {
          "height": 500,
          "resize_url": "http://lh3.googleusercontent.com/EMPSTu8_Z5Uoyy1kFMDJfRNLWRJlNXOsTPhespllVIfCXZtgRyrt4e7L7tKBY9X9vyrmikLJieQw_A2zewVUwKs0LcdIyhxR",
          "size": 109755,
          "type": "image/jpeg",
          "url": "/webhook-uploads/1427901996148_5600171335_0db8f3b789.jpg",
          "width": 333
        },
        "image_credit": "Photo courtesy of International Criminal Court",
        "isDraft": false,
        "last_updated": "2015-04-23T11:27:00-04:00",
        "name": "Francis Kirimi Muthaura",
        "preview_url": "838a2bfa-2856-9f8b-30c0-bfa955a455a1",
        "publish_date": "2015-03-02T16:38:00-05:00",
        "title": "Former Head of the Public Service (and Chair of the National Security Advisory Committee) and Secretary to the Cabinet of the Republic of Kenya"
      },
maxlever commented 9 years ago

One value was also null in my case. I fixed it by POSTing to the API endpoint (http://www.webhook.com/docs/api-endpoints/#update_an_item) and updating the item. Not sure how the value became null in the first place.