|
Hi all,
creating a new webapp with grails 2.0.4 and even 2.1.0 and running it with SpringSource Groovy and Grails IDE (for example the latest 3.0.0), I see some problems (it give me errors) if I show the page from inside the IDE. All seems to be due to the DOCTYPE of default gsp pages for example under /grails-app/views/ (should be DOCTYPE but instead it's doctype), and even some tags (meta, link) are not closed in the right way for html 5. The same even in scaffold templates. In normal modern browsers this doesn't give problems, probably they fix all those little things ... I know that this is a small thing, but could be useful to fix ... tell me if you need a jira ticket for this. Thank you very much, Sandro |
|
> All seems to be due to the DOCTYPE of default gsp pages for example under
> /grails-app/views/ (should be DOCTYPE but instead it's doctype), and even > some tags (meta, link) are not closed in the right way for html 5. > The same even in scaffold templates. > > In normal modern browsers this doesn't give problems, probably they fix all > those little things ... Please raise an issue. A pull request would also be welcome if you're up for it! Thanks, Peter -- Peter Ledbrook Developer Advocate VMware t: @pledbrook --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Peter,
> Please raise an issue. Yes, tomorrow I'll open it. > A pull request would also be welcome if you're up for it! I'm sorry but I'm a git newbie, so I have to look on how to do, but I'll try to look :-) ... Thanks for now, Sandro --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
>> A pull request would also be welcome if you're up for it!
> I'm sorry but I'm a git newbie, so I have to look on how to do, but > I'll try to look :-) ... http://www.youtube.com/watch?v=MbDAmS-qCb4 Peter -- Peter Ledbrook Developer Advocate VMware t: @pledbrook --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by Sandro Martini
You should probably also file a Jira for SpringSource Groovy and Grails IDE, as the current Grails templates are according to spec.
Doctype is case-insensitive (http://www.w3.org/TR/html5/syntax.html#the-doctype) Anyway, +1 for changing to uppercase (<!DOCTYPE html>) because I think it's the most commonly used form, and also the example given by the spec. (although HTML5 Boilerplate uses lowercase) Meta and link are void elements (http://www.w3.org/TR/html5/syntax.html#void-elements), and can't be closed. Actually; and end tags are forbidden. i.e. <meta name="keywords" content="grails"> is correct, while <meta name="keywords" content="grails"></meta> is forbidden. However, a slash is allowed: <meta name="keywords" content="grails"/> . But as the spec states, "This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing." (http://www.w3.org/TR/html5/syntax.html#start-tags). I would vote for changing doctype to <!DOCTYPE html> but leaving the meta and link tags as is. Ronny On Aug 21, 2012, at 4:31 PM, Sandro Martini wrote: > Hi all, > creating a new webapp with grails 2.0.4 and even 2.1.0 and running it with > SpringSource Groovy and Grails IDE (for example the latest 3.0.0), I see > some problems (it give me errors) if I show the page from inside the IDE. > > All seems to be due to the DOCTYPE of default gsp pages for example under > /grails-app/views/ (should be DOCTYPE but instead it's doctype), and even > some tags (meta, link) are not closed in the right way for html 5. > The same even in scaffold templates. > > In normal modern browsers this doesn't give problems, probably they fix all > those little things ... > > > I know that this is a small thing, but could be useful to fix ... tell me if > you need a jira ticket for this. > > Thank you very much, > Sandro > > > > > -- > View this message in context: http://grails.1312388.n4.nabble.com/Display-problems-inside-Eclipse-for-a-newly-created-Grails-webapp-tp4633528.html > Sent from the Grails - dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Ronny,
thanks for the info ... I have read that DOCTYPE should be always uppercase, so as you I think could be updated everywhere to be uppercase. > You should probably also file a Jira for SpringSource Groovy and Grails IDE, as the current Grails templates are according to spec. On this I'll try to look tomorrow ... From my tests I think it would be safer to put meta and link tags to the self-closing way, in tis way they works even from inside the eclipse/sts preview. Ok, could be a problem of the eclipse/sts preview component, but I dont' think this could cause problems with standard browsers. Anyway I could do a separate task/pull for this. Bye, Sandro --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
Ok, could be a problem of the eclipse/sts preview component, but I This blog post indicates that Eclipse Helios uses standard meta tags for its HTML5 templates: I would hesitate to use XHTML form simply to satisfy older versions of Eclipse. Peter -- Peter Ledbrook Developer Advocate VMware t: @pledbrook |
|
In reply to this post by Sandro Martini
On Aug 22, 2012, at 12:44 AM, Sandro Martini wrote: > Hi Ronny, > thanks for the info ... I have read that DOCTYPE should be always > uppercase, so as you I think could be updated everywhere to be > uppercase. I don't know where you have read that, but the spec is quite clear on the fact that doctype is case insensitive: "A string that is an ASCII case-insensitive match for the string "<!DOCTYPE"." > >> You should probably also file a Jira for SpringSource Groovy and Grails IDE, as the current Grails templates are according to spec. > On this I'll try to look tomorrow ... > > > From my tests I think it would be safer to put meta and link tags to > the self-closing way, in tis way they works even from inside the > eclipse/sts preview. Adding a slash doesn't make meta and link tags self-closing, the slash is simply ignored. This shouldn't be added to Grails IMO, it's not idiomatic HTML. If some versions og Eclipse really has some problems with this, it should be fixed there. Ronny --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi all,
>This blog post indicates that Eclipse Helios uses standard meta tags for its HTML5 templates: the strange is that I'm using the latest Spring STS 3.0.0, and even eclipse helios (3.7.x) and juno (4.2) ... as other installations. > http://blog.webagesolutions.com/archives/419 As seen here: Opening the Web Page in a Browser By default, if you click the browser icon in the Eclipse toolbar, it will open the internal browser, which is based on IE. Unless you’re using Windows 7, the version of IE that’s used is IE7 or IE8, neither of which provide much HTML5 support. Don’t despair. You can change the Eclipse settings to open a different browser, such as Google Chrome 10, Opera 11, or Firefox 4, which provide much better support for HTML5. To do so: probably the preview visualization problem could be due to this, so changing to use a better HTML5 browser should resolve the trick even without changing anything in pages ... >I would hesitate to use XHTML form simply to satisfy older versions of Eclipse. Yes, you have reason ... Some other test, to have more info: - with a just-created grails webapp (with Grails-2.1.0), and the run inside the same workspace (spring sts 3.0.0), the preview works, even without the to uppercase change to the doctype (and the self-closing and other tags) ... - with a new static webapp, I copied all the contents of the home page of my just created empty grails webapp in a grails_test.html page, then try to run with an HTTP preview inside the IDE (with doctype and other tags as is, without any change) ... and today even the preview works ... sorry for the noise here, but it's very strange. Today I'll open the jira issue (with a link to this discussion, could be useful to someone), and then try to look at how to create the patch for the doctype and attach to the issue, without doing damages :-) . Anyway, before applying the patch it could be better to see if someone other had my problem ... Let's update. Thanks again to all. Bye, Sandro --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi all,
this is the issue just created: http://jira.grails.org/browse/GRAILS-9354 I have cloned the grails-core in my local dev environment, so I should be ready for the fix and the pull request before tomorrow ... Sorry, only a question, do you prefer it in a dedicated branch (sorry, it's my first pull request with git) ? And last, do you want another pull request even to add it in the 2.0.x maintenance branch ? Thanks again for all, Sandro --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
> I have cloned the grails-core in my local dev environment, so I should
> be ready for the fix and the pull request before tomorrow ... > > Sorry, only a question, do you prefer it in a dedicated branch (sorry, > it's my first pull request with git) ? > And last, do you want another pull request even to add it in the 2.0.x > maintenance branch ? You should push your changes to a dedicated branch in your own GitHub repository, for example you could call it 'patch-1'. Then you can submit the pull request _from_ that branch (patch-1) to the 2.1.x branch in grails/grails-core. We'll take it from there. Thanks, Peter -- Peter Ledbrook Developer Advocate VMware t: @pledbrook --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Peter,
just do the pull request: https://github.com/grails/grails-core/pull/252 tell me if there is something to change in it. Thanks a lot for all the help ... I hope to be able to do other pull requests now :-) ... Bye, Sandro --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
> just do the pull request:
> https://github.com/grails/grails-core/pull/252 > > tell me if there is something to change in it. Could you please resubmit to the 2.1.x branch? It's currently targetted at 'master' (which is the default). Thanks, Peter -- Peter Ledbrook Developer Advocate VMware t: @pledbrook --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Peter, excuse me, I'm doing the new pull request, but switching to
branch-2.1.x now I see many other commits (213 in total) ... so I think I have been doing something wrong: in my environment i created the patch branch from master, is this the mistake ? So I should destroy and redo all from the 2.1.x branch, right ? Thanks for your patience ... and sorry again. Bye --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
> Peter, excuse me, I'm doing the new pull request, but switching to
> branch-2.1.x now I see many other commits (213 in total) ... so I > think I have been doing something wrong: in my environment i created > the patch branch from master, is this the mistake ? > So I should destroy and redo all from the 2.1.x branch, right ? There is a shortcut. Let's say you created a local branch 'patch-1' from 'master' and committed your changes to 'patch-1'. You can apply your changes to 2.1.x by executing this command: git rebase --onto 2.1.x master patch-1 Unless there are conflicts, you should then be able to do: git push origin :patch-1 git push origin patch-1:patch-1 In fact, you should be able to do that with the single command git push --force origin patch-1 but the former is more amenable to differences in branch names. > Thanks for your patience ... and sorry again. No problem. Happy to help. 'git' is not the simplest tool out there, but it does allow for a great deal of power and flexibility. Peter -- Peter Ledbrook Developer Advocate VMware t: @pledbrook --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Hi Peter,
after some tests I had the same pull request (with many other master-related changes), so after some more tests to avoid strange things I deleted my forked repository, and I'm re-cloning it from grails-core. Definitely I have to study better git, after years with subversion is hard at the beginning ... Tomorrow I should be able to redo the fix (luckily it's trivial :-) ) and the pull request for the 2.1.x branch ... let's update. Bye --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Ok, now there is the new pull request, this time good for the 2.1.x
branch (I hope :-) ). Just for reference (even for me, for future fix) I put here a quick list of git commands I used (if useful to someone): on GitHub, for the grails-core repository, then cloned my forked version, and wait for the download to finish (approx. 300 MB) ... Then cd into grails-core, and: useful: git config --global credential.helper 'cache --timeout=3600' Note: - for master branch it would be simpler ... - 2.1.x is the destination branch, so I have to use it even in local, to avoid to mhanbdle it with other git commands - GRAILS-9354 is the name of the JIRA issue, and so the branch name for the fix git branch git checkout 2.1.x git branch git checkout -b GRAILS-9354 2.1.x git branch git show-branch --list or, better: git log -3 --graph change sources, verify changes with git status and git diff ... then add and commit them: git add . git commit -m "GRAILS-9354" finally, verify opt with: git status git log -3 push to origin (my forked repository): git push origin GRAILS-9354 Finally, back to my forked repository in GitHub, get the commit, and do the pull request, but chosing the right destination branch (in this case 2.1.x) in grails original repository. I hope this will be useful to someone other ... Bye, Sandro --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
