App-Inventor-Gallery icon indicating copy to clipboard operation
App-Inventor-Gallery copied to clipboard

Previous Owner broken during Upload

Open reedspool opened this issue 13 years ago • 4 comments

Found a bug. For some reason, previous authors aren't being stored properly during new app creation. To reproduce this bug, simply "upload" a new app with anything you like in most fields, just make sure that the Previous Owners field contains some text. Then switch to another module, and back again. This error is the MApps.getAppList attempting to process an array of previous authors, where instead it only receives a string.

reedspool avatar Jul 08 '11 21:07 reedspool

It looks like addOrEditApp() in MApps.js needs code like the following to be added before the put() call:

if (typeof appData.previousAuthors == "string") { appData.previousAuthors = appData.previousAuthors.split(","); }

and the ObjAppData constructor needs

previousAuthors : []

in the setData call for the initial field values.

derrell avatar Jul 09 '11 00:07 derrell

For the time being, I've disabled the editing field for the author chain. When we're ready for it, it will almost certainly not be a plain text field.

derrell avatar Jul 15 '11 01:07 derrell

If you type in the url:

http://app-inventor-gallery.appspot.com/rpc?tag=tag:Graphics

and search through the resultant JSON for the "previousAuthors" field of the app i just created named "PreviousAuthorChain?" you'll see that previousAuthors is still being written the the DB, just the input box is disabled, so the following is written on every addition to the database:

"previousAuthors":["<","n","o","t"," ","y","e","t"," ","i","m","p","l","e","m","e","n","t","e","d",">"]

Something tells me this is not what you wanted.

reedspool avatar Aug 02 '11 22:08 reedspool

Probably not. I'll look at it. To me.

derrell avatar Aug 02 '11 22:08 derrell