1
Vote

0x800a138f Error- JavaScript RT Error: Unable to get 'attachment' Propriety.

description

Using : Metropress v2 Beta; Visual Studio 2012; Windows 8

Issue :
I am developing win8 app very first time for my blog and let me clear this that i don't have any experience in this field. I did everything which is given in documentation but at the time of deploy VS (visual studio) shows error in wp.module.js (nearby line 563) under

// Translate Page to local object
wordpressModule.prototype.convertPage = function(item, parentId)

but this solved when i filled values like title, id, content etc. Again i tried to run it but it shows error

In Dilouge Box:
Exception is about to be caught by JavaScript library code at line 591, column 5 in ms-appx://metropress/modules/wordpress/js/wp.module.js
0x800a138f - JavaScript runtime error: Unable to get property 'attachments' of undefined or null reference
If there is a handler for this exception, the program may be safely continued.

In JavaScript Console:
SCRIPT5007: Exception is about to be caught by JavaScript library code at line 591, column 5 in ms-appx://metropress/modules/wordpress/js/wp.module.js
0x800a138f - JavaScript runtime error: Unable to get property 'attachments' of undefined or null reference
File: wp.module.js, Line: 591, Column: 5

In Code Panel: {line 2 is highlighted in this code (res.imgUrl = 'ms-appx:/images/blank.png')}
// get the first image from attachments
    res.imgUrl = 'ms-appx:/images/blank.png';
    for (var i in item.attachments) {
        if (item.attachments[i].url != "") {
            res.imgUrl = item.attachments[i].url;
            break;
        } else if (item.attachments[i].images != null) {
            res.imgUrl = item.attachments[i].images.full.url;
            break;
        }
    }
So, what i tried ? I tried to replace highlighted image url with outbound http link and in-app appx link but everytime VS shows error which i briefed before.

I think this is an issue if it's not an issue then please explain solution for this error in brief.

comments