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

Can't create new entry #3

Closed
whughes98144 opened this issue Feb 9, 2014 · 10 comments
Closed

Can't create new entry #3

whughes98144 opened this issue Feb 9, 2014 · 10 comments

Comments

@whughes98144
Copy link

A recent change:

b396923

Has made new entries impossible as the params map expected down match what's passed by the gsp in create.gsp. Changing this back fixes the most obvious issue. Don't know if there was a good reason for this change with the changes to the gsp not getting checked in?

@whughes98144
Copy link
Author

Sorry, that change was in the BlogController.groovy.

@ghost
Copy link

ghost commented Feb 9, 2014

I'm using the latest release of the plugin (v. 0.3.3) and can create new entries. There's not enough information in this issue for me to reproduce your problem, so I'm closing it. I'll reopen if if you update the issue with something that demonstrates the problem e.g. a sample app, or a unit/integration test.

@ghost ghost closed this as completed Feb 9, 2014
@whughes98144
Copy link
Author

Hmmm, one of us has some cruft, me thinks. There is a disagreement between the current create.gsp and the controller. Is it possible you change the gsp code but didn't check it in? Looking at the code in github (using the github UI to look at the code, not through any download), the gsp and controller don't work. One puts values into a map, one doesn't pull from a map (any longer).

There hasn't been a huge change in the way properties on a domain object are set after 2.3.4, has there?

To reproduce, I ran 'grails create-app ', updated the BuildConfig to add this plugin, ran the app and saw the error.

@ghost
Copy link

ghost commented Feb 9, 2014

Could you please attach the sample app that demonstrates the problem?

@ghost
Copy link

ghost commented Feb 9, 2014

There is a disagreement between the current create.gsp and the controller.

Can you be a bit more specific about what this disagreement is?

Is it possible you change the gsp code but didn't check it in?

I don't think so, because my app uses the same version of the plugin that you (presumably) are using - version 0.3.3 downloaded from the Grails plugin repo

@whughes98144
Copy link
Author

The gsp is putting the fields of the html form prefixed with 'entry.' so 'entry.title', etc. The controller will then get a param map which an entry called 'entry' which has as a value a map of these. So there will be params.entry.title, etc. But the controller has been changed from
entry.properties = params['entry']
to
entry.properties = params

Which won't work, unless something has changed dramatically in grails bindings.

I'm attaching my blogTest.tar test project which demonstrates the problem.

-) grails run-app blogTest
-) click on the blogController link
-) click on 'create'
-) fill in the values, click 'publish'. Error

@whughes98144
Copy link
Author

Um, sorry, how can I attached this tar file? I can't add it to comments, they only take picture formats. I don't see any attach anywhere else ...

@ghost ghost reopened this Feb 9, 2014
@ghost
Copy link

ghost commented Feb 9, 2014

Sorry, I assumed it's possible to attach files to issues. You can either upload it somewhere that I can download it from or email it to me (domurtag@REMOVEyahoo.co.uk). If it's too big to email, delete the contents of the target directory then create the tar again.

BTW, I'm pretty sure the reason you're seeing this issue and I'm not is because I probably don't use that GSP in my app.

@whughes98144
Copy link
Author

You don't use the gsp in your app? But you tested with it, right?

@ghost ghost closed this as completed in b3eb68d Feb 9, 2014
@ghost
Copy link

ghost commented Feb 9, 2014

You don't use the gsp in your app? But you tested with it, right?

Unfortunately there are no tests of the GSPs in the plugin.

I've released version 0.3.4 that reverts the change you mentioned, so this should fix the problem

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant