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

index.html in JavaScript Address Book Example Invalid XML Payload Error #46

Closed
thallstein opened this issue Mar 10, 2016 · 9 comments
Closed
Labels

Comments

@thallstein
Copy link

I'm going through the JavaScript sample program. When I open the file and try to save it having made no changes I get an xml payload error. I've attached a screenshot of the dialog box.
javascript addressbook

@todda48
Copy link
Contributor

todda48 commented Mar 10, 2016

This is a bug that we'll fix ASAP. The API used to allow creating a single record without the resource array wrapper. This is no longer allowed, and the JavaScript sample app needs to be changed to use the array format. You can fix it yourself by changing the AJAX calls to use array format.

{"name":"Joe"} ---> {"resource":[{"name":"Joe"}]}

@drewpearce drewpearce added the bug label Mar 10, 2016
@carstenjacobsen
Copy link

The bug has been fixed and both the code in the repo and package have been updated.

@thallstein
Copy link
Author

Hi Carsten,

I used Bitnami to install DreamFactory on AWS. Could you provide inx or point me to a link for how to update the AWS instance?

Thanks so much.

Trevor

@todda48
Copy link
Contributor

todda48 commented Mar 15, 2016

@carstenjacobsen
Copy link

Hi Trevor,

The bug has been fixed and you can get the updated package from the repo
(or import it again from your instance):
https://github.com/dreamfactorysoftware/javascript-sdk/blob/master/add_javascript.dfpkg

Thanks,
Carsten

Carsten Jacobsen | Sr. Software Engineer | DreamFactory |t. 408.915.7815 |
@dfsoftwareinc | [image: DreamFactory] http://www.dreamfactory.com/

On Mon, Mar 14, 2016 at 4:14 PM, thallstein notifications@github.com
wrote:

Hi Carsten,

I used Bitnami to install DreamFactory on AWS. Could you provide inx or
point me to a link for how to update the AWS instance?

Thanks so much.

Trevor


Reply to this email directly or view it on GitHub
#46 (comment)
.

@thallstein
Copy link
Author

Quick question - I deleted the app and then went to apps > import. When I proceed with the import I get an error message: "Failed to create records in 'contact'. SQLSTATE[23000]: Integrity constraint violation: 19 PRIMARY KEY must be unique

import error

@benbusse
Copy link

you probably need to drop the tables in the schema tab, then import the app again. when you import the app again, it's importing the schema, but if the schema is already there then you'll have collisions.

@thallstein
Copy link
Author

Yah – I just did that. How does one import a 2nd example app? I wanted to look at the angular js example, but presumably it’s going to complain about this same thing.

From: Ben Busse <notifications@github.commailto:notifications@github.com>
Reply-To: dreamfactorysoftware/dreamfactory <reply@reply.github.commailto:reply@reply.github.com>
Date: Tuesday, March 15, 2016 at 1:20 PM
To: dreamfactorysoftware/dreamfactory <dreamfactory@noreply.github.commailto:dreamfactory@noreply.github.com>
Cc: Trevor z Hallstein <trevor@hallstein.netmailto:trevor@hallstein.net>
Subject: Re: [dreamfactory] index.html in JavaScript Address Book Example Invalid XML Payload Error (#46)

you probably need to drop the tables in the schema tab, then import the app again. when you import the app again, it's importing the schema, but if the schema is already there then you'll have collisions.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-197004921

@benbusse
Copy link

i believe each sample app uses the same schema (i.e. schema isn't namespaced for each example app). you can try importing a second one, but i think you need to drop the schema, then import the second app.

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

5 participants