Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.2.1
    • Fix Version/s: None
    • Component/s: View technologies
    • Labels:
      None

      Description

      Grails seems to occasionaly mix up views from different projects if they relate to the sam domain objects. This may manifests as a varitety of errors, when launching the project. In my case I launch one project, and one of the views that is rendered comes from a different project.

      Background:

      I've got a domain module and a frontend and admin backend project using the domain classes as a local plugin in a simple directory structure:

      root:

      • domain
      • Admin
      • booking

      Both backend and frontend have a Controller and Views for the "CourseEvent" domain class. When I run project frontend (Admin is not running),and I invoke the generated "list" View, I'd expect to see the view stored in:

      booking/grails-app/views/courseEvent/list.gsp

      What I get is the view stored under:

      Admin/grails-app/views/courseEvent/list.gsp

      So a view of a different project, which is not running is rendered.

      Also, when I delete the views in booking/grails-app/views/courseEvent/ ,
      then cd to the booking dir and issue:
      >grails GenerateViews de.eppleton.cms.CourseEvent

      I get this output:

      Generating views for domain class de.eppleton.cms.CourseEvent
      > File /grails-app/views/courseEvent/create.gsp already exists. Overwrite?[y,n,a]

      If I choose the "a" option the views get generated in the correct (empty) directory. Obviously grails mixes up the two independent projects.

      Judging from mailing lists having a admin backend and a frontend sharing the same domain classes in separate projects is a common setup. Using generated views and controllers as a starting point also seems common. So I assume this might be a problem affecting many develpers.

        Issue Links

          Activity

          Hide
          Anton Epple added a comment -
          Show
          Anton Epple added a comment - Maybe related: http://jira.grails.org/browse/GPWEBFLOW-40
          Hide
          Lari Hotari added a comment -

          Can you please contribute a test application that reproduces the problem? That would help a lot. Most of the time in fixing these type of issues go into reproducing the problem.

          Show
          Lari Hotari added a comment - Can you please contribute a test application that reproduces the problem? That would help a lot. Most of the time in fixing these type of issues go into reproducing the problem.
          Hide
          Lari Hotari added a comment -

          This might be related to GPSCAFFOLD-62 if you were using dynamic scaffolded views.

          Show
          Lari Hotari added a comment - This might be related to GPSCAFFOLD-62 if you were using dynamic scaffolded views.
          Hide
          Lari Hotari added a comment -

          https://github.com/grails-plugins/grails-scaffolding/commit/f5a6209ad50d9d03ca588ea9fe017e6720ad7c9b . It is still missing plugin and namespace attribute support. Are you using namespaces?

          Show
          Lari Hotari added a comment - https://github.com/grails-plugins/grails-scaffolding/commit/f5a6209ad50d9d03ca588ea9fe017e6720ad7c9b . It is still missing plugin and namespace attribute support. Are you using namespaces?
          Hide
          Lari Hotari added a comment -

          Anton, are you using scaffolded controllers? have you also generated the controllers?

          I will close this issue as "cannot reproduce" until some more information is provided.

          It looks like this might be a "feature" of the scaffolding plugin that it doesn't isolate controllers and views used in different plugins. That's the only situation where I could think that mix-up could currently happen.

          Show
          Lari Hotari added a comment - Anton, are you using scaffolded controllers? have you also generated the controllers? I will close this issue as "cannot reproduce" until some more information is provided. It looks like this might be a "feature" of the scaffolding plugin that it doesn't isolate controllers and views used in different plugins. That's the only situation where I could think that mix-up could currently happen.

            People

            • Assignee:
              Lari Hotari
              Reporter:
              Anton Epple
            • Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development