Browsing Views: e.g. clicking "Show" get you from "view-view" to "table-view"

Issue #191 resolved
Christopher Kramer created an issue

Originally reported on Google Code with ID 191

What steps will reproduce the problem?
1. open a view
2. click "Show"

What is the expected output? What do you see instead?
Expected: Same page opens.
Actual: "Edit" and "delete" links appear like for a table.

What version of the product are you using?
PLA 1.9.4 r352 (and prior)


Please provide any additional information below.

This issue was e-mailed to me by Lonnie (who could not open an issue because he has
no google account). He also attached a patch which I attach here to the issue (based
on a custom version of 1.9.3.3). Thanks a lot!

I will have a look at this.

The problem is that the GET-parameter "view=1" is not kept across links/forms. Lonnie's
patch adds the parameter.

I will have a look at this, but I think we should probably drop the "view=1" parameter
completely and rather detect whether it is a view or table. But maybe we do a quick
fix for 1.9.4 and a better fix next.

Reported by crazy4chrissi on 2013-03-12 16:21:13

<hr> * Attachment: view_mode.patch

Comments (4)

  1. Christopher Kramer reporter
    It is especially bad that we use a GET parameter called "view" for this as "view" is
    used with different semantics on the db-level (like view=export or view=sql).
    I think we should remove view=1 completely and instead _detect_ if it's a table or
    view.
    

    Reported by crazy4chrissi on 2013-03-13 17:40:38

  2. Christopher Kramer reporter
    As this is spread all over the code we probably better do a quick fix for 1.9.4 like
    the patch above, otherwise we will only introduce new bugs.
    
    But we should definitely have a look at view=1. There is loads of redundant code in
    there that could be removed together with the parameter.
    

    Reported by crazy4chrissi on 2013-03-14 00:47:36

  3. Christopher Kramer reporter
    This issue was closed by revision r363.
    

    Reported by crazy4chrissi on 2013-03-17 23:05:00 - Status changed: Fixed

  4. Christopher Kramer reporter
    Okay, I fixed this in SVN very similar to the patch attached above.
    Another thing I fixed:
    If a view is empty (no rows), PLA proposed to insert new rows, which won't work and
    the link also did not include the view=1 parameter. I removed this proposal (if it's
    a view).
    
    I will open another issue proposing the removal of view=1 alltogether.
    

    Reported by crazy4chrissi on 2013-03-17 23:08:44

  5. Log in to comment