Page 2 of 3

new errors, that I didnt have earlier

Posted: Sat Apr 19, 2014 11:58 pm
by Michael4771079

Hi Igor,
test in browser from builder, login Reg, or us "Q" as log and pass, order an item from a few pages, click checkout btn, open tiles for items in order, click delete on any item and errors will show in console.

login still no working correctly and if you load app on iphone,
click on a few different pages you will notice the speed of the services, a bit slow, leave the phone alone for an hour, and the services dont always work,

thx Igor


new errors, that I didnt have earlier

Posted: Mon Apr 21, 2014 10:00 pm
by Illya Stepanov

Hi Michael,

We have looked your app.

And found this code below, which has the problem:
precode
var mainorderArray;
try {
mainorderArray = JSON.parse(localStorage.getItem("mainorderArray"));
if ({}.toString.call(mainorderArray) !== "[object Array]") {
mainorderArray = [];
}
} catch ( e ) {
mainorderArray = [];
}
var $this = $(this);

//Here is $this(button) don't have an "idx" attribute. So you have to change it attribute to other one in accordance to the logic you need.
console.log($this);
console.log($this.attr("idx"));

if($this.attr("idx").slice(1)) {
var index = parseInt($this.attr("idx").slice(1));
if (index >=0 && index < mainorderArray&#46;length) {
mainorderArray&#46;splice(index, 1);
}
}
localStorage&#46;setItem("mainorderArray", JSON&#46;stringify(mainorderArray));/code/pre
The problem is getting "idx" attribute from the clicked button "mobilebutton_76". You should change this code in accordance to your purpose and not use "idx" attribute in this new implementation.

For example you can use "id" attribute instead of "_idx", if this will fit the app logic.

Regards.


new errors, that I didnt have earlier

Posted: Tue Apr 22, 2014 10:32 am
by Michael4771079

Hi Maryna,
the code above is to delete an item from array, since the upgrade this has changed, it was working before
.I tried replacing _idx with id but that didnt work.
I really dont understand what lllya means
can you help


new errors, that I didnt have earlier

Posted: Tue Apr 22, 2014 3:42 pm
by Michael4771079

Hi Katya,
can you help here?


new errors, that I didnt have earlier

Posted: Tue Apr 22, 2014 4:07 pm
by Kateryna Grynko

Hi Michael,

Try reading dsid attribute please.


new errors, that I didnt have earlier

Posted: Tue Apr 22, 2014 4:33 pm
by Michael4771079

Im sorry Katya,
I dont understand, this code deletes the ordered item from the local storage array thats used to collate ordered items for sendgrid service.
this code worked before the upgrade


new errors, that I didnt have earlier

Posted: Tue Apr 22, 2014 6:39 pm
by Kateryna Grynko

Michael,

This tag was removed after update. Please replace:pre$this&#46;attr("_idx")&#46;slice(1)/preWith the following code:pre$this&#46;attr("dsid")&#46;slice(1)/pre


new errors, that I didnt have earlier

Posted: Tue Apr 22, 2014 7:16 pm
by Michael4771079

Thx Katya,
here's the code I added, error is gone but the item is not deleted from localstorage
array

codevar deal2Array;
try {
deal2Array = JSON&#46;parse(localStorage&#46;getItem("deal2Array"));
if ({}&#46;toString&#46;call(deal2Array) !== "[object Array]") {
deal2Array = [];
}
} catch ( e ) {
deal2Array = [];
}
var $this = $(this);
var index = parseInt($this&#46;attr("dsid")&#46;slice(1));
if (index >=0 && index < deal2Array&#46;length) {
deal2Array&#46;splice(index, 1);
}
localStorage&#46;setItem("deal2Array", JSON&#46;stringify(deal2Array));/code


new errors, that I didnt have earlier

Posted: Wed Apr 23, 2014 12:14 am
by Michael4771079

this issue is 5 days old, it has taken that long for support to tell me they changed a tag that is important to the logic of my app,

on the last upgrade my login stopped working properly, but on the bright side, I only had to wait 2 week for that bug fix!
being ignored by some of the support team doesn't help,

13 hours and counting for 2 answers that dont help with an issue that was not caused by us.

Bugs with new upgrades are unavoidable, but as an appery.io guinea pig I misguidedly thought any support needed on an issue that was created by upgrade would be a priority. lol

now thats off my chest I will go to bed, and try to came down!


new errors, that I didnt have earlier

Posted: Wed Apr 23, 2014 2:08 am
by Igor

Hi Michael.

Please try to use this code:
pre
&#47;&#47;var index = parseInt($this&#46;attr("idx")&#46;slice(1));
var rootItemElement = $this&#46;closest("table");
var index = parseInt(rootItemElement&#46;attr("idx")&#46;slice(1));
/pre

Instead of yours:
pre
var index = parseInt($this&#46;attr("_idx")&#46;slice(1));
/pre
You should change this code on all "delete" buttons.