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

In production mode, component event requests that reference an unknown component should respond with a 404

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2
    • Fix Version/s: 5.4
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      when an embedded component cannot be found by id, then ComponentPageElementImpl throws a TapestryException at line 841 for 5.1.0.5 (UnknownValueException for 5.2.4).

      I suggest throwing a special kind of exception in such case (e.g. EmbeddedComponentNotFoundException or ComponentNotFoundException), so that application would be able to handle such cases separately (e.g. by serving a 404 error page).

      Particular use-case: google indexing bot cached a tapestry page and tries indexing links that are included on this page. If links are actionlinks, then they include id of the component. When one changes the id of the component (or renames the component), then the "old" link doesn't work anymore as it contains old id of the component -> google indexing bot is served with Tapestry error page (which is a typical page). Instead, it makes sense to send a 404 error as result and let google bot know that there is no such resource anymore.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hlship Howard M. Lewis Ship
                Reporter:
                anton.litvinenko Anton Litvinenko
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: