Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Previous Owner broken during Upload #34

Open
reedspool opened this issue Jul 8, 2011 · 4 comments
Open

Previous Owner broken during Upload #34

reedspool opened this issue Jul 8, 2011 · 4 comments
Labels

Comments

@reedspool
Copy link
Collaborator

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.

@derrell
Copy link
Owner

derrell commented Jul 9, 2011

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
Copy link
Owner

derrell commented Jul 15, 2011

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.

@reedspool
Copy link
Collaborator Author

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.

@derrell
Copy link
Owner

derrell commented Aug 2, 2011

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

@ghost ghost assigned derrell Aug 2, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants