All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Low Variables saves empty fields sometimes, when login session has expired

Truong 10 Oct 2019 10:14 problem, complete

I've got a serious issue for low variables.
For several times now I encountered the following situation:
I'm adjusting some fields
On occasion my login-session expires. So when I save a variable group. I get the EE login-dialogue.
But then I see that the entire group has emptied.
This does not happen all the time, but now in the last several months I have encountered this behaviour for at least 3 times.
So please add some safety measures, like maybe an undo save possibility or something. Thanx.

Replies

  1. Low 14 Oct 2019 06:21

    Can you reproduce this issue on demand or is it intermittent, even with the expired session?

  2. Truong 16 Oct 2019 01:08

    I can reproduce this, I just witnissed this behaviour, so its quite fresh in my memory.
    (using mac osx and chrome)

    I'm using low variables quite heavily during development... so I have in one tab the low variables panel in the backend open.
    On another tab I have my template / frontend open.

    Sometimes I switch to console view in chrome. But when I reload the tab of the frontend, the login-session immediately expires.

    When going back to the backend on the other tab and pushing save variables on the group, voila ... I get a new login dialogue and when returning to the variable group all fields are emptied.

  3. Truong 16 Oct 2019 15:52

    And again

  4. Low 16 Oct 2019 18:07

    Okay, try this...

    Open up mcp.low_variables.php and look up line #355 which reads

    if ( ! ($vars = $this->vars->get_meta_by_group($group_id)))


    ...and change that to...

    if (empty($_POST) || ! ($vars = $this->vars->get_meta_by_group($group_id)))


    ...and save the file.

    Does that solve the issue?

  5. Truong 17 Oct 2019 04:36

    Thanx, I changed that line of code and it looks like its working.

    I made a seperate test group ... and reproduced the steps, and now after saving (and seeing the login dialogue) that line of code skips the saving process and just redirects me back to the page I was just before my session logged out.

    see screen.

  6. Low 17 Oct 2019 08:00

    Good, that was the intention.