Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2705

Fix warning Could not add object with duplicate id 'tapestry.css'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.5.0, 5.6.0, 5.6.1, 5.6.2, 5.7.0, 5.6.3, 5.7.1, 5.7.2, 5.6.4, 5.7.3, 5.8.0
    • 5.8.1
    • tapestry-core

    Description

      For the last few versions of tapestry, the following warning messages would show in the logs

      WARN  org.apache.tapestry5.modules.JavaScriptModule.CoreJavaScriptStack Could not add object with duplicate id 'tapestry.css'.  The duplicate object has been ignored.
      WARN  org.apache.tapestry5.modules.JavaScriptModule.CoreJavaScriptStack Could not add object with duplicate id 'exception-frame.css'.  The duplicate object has been ignored.
      WARN  org.apache.tapestry5.modules.JavaScriptModule.CoreJavaScriptStack Could not add object with duplicate id 'tapestry-console.css'.  The duplicate object has been ignored.
      WARN  org.apache.tapestry5.modules.JavaScriptModule.CoreJavaScriptStack Could not add object with duplicate id 'tree.css'.  The duplicate object has been ignored.

      I think this is because the method addCoreStylesheets in JavaScriptModule is being called multiple times but it should only be called once. This is mainly related to adding bootstrap 4 and font-awesome. I have created a diff which shows what changes are needed so that addCoreStylesheets is only called once. Unfortunately I haven't been able to test it as I haven't worked out yet how to build tapestry from source.

       

       

      Attachments

        1. JavaScriptModule.diff
          3 kB
          D Tim Cummings

        Activity

          People

            thiagohp Thiago Henrique De Paula Figueiredo
            timcu D Tim Cummings
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: