napitek / myroundcube

Automatically exported from code.google.com/p/myroundcube
0 stars 0 forks source link

[calendar] Events dissapear #755

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Token: 024c6de0b4dc0ee0ca9ed49d80549ec0 (Don't modify this token!)
Version: 17.0.20 (07-08-2014)
PHP: 5.4.35-1 deb.sury.org~precise 1
RCMAIL: 1.0.2
Database: mysql
SERVER: nginx/1.1.19
----
I.  Issue Description:

II. Steps to reproduce the Issue:
1. Make an event
2. Refresh page
3. Event is gone again.

There's something weird going on, and I've looked at the code, if you follow 
the path:

(1) $this->add_hook('login_after', array($this, 'clearCache')); 

(2) function clearCache(){
....
$this->backend->truncateEvents(3);
....
}

(3)  public function truncateEvents($mode=0) {
....
      else if($mode == 3){
        $query = $this->rcmail->db->query(
          "DELETE FROM " . $this->table('events') . "
          WHERE ".$this->q('user_id')."=?",
          $this->rcmail->user->ID
        );
      }
...
}

So when someone logs in, it deletes EVERYTHING in table `events` for that user?
How did this ever work?
I disabled it for now by putting a return true; in the code.

Original issue reported on code.google.com by pe...@digiter.nl on 15 Dec 2014 at 4:38

GoogleCodeExporter commented 8 years ago
The database table is just a cache. So, deletion after login is fine. Are you 
sure what you are talking about? Make sure you have setup CalDAV properly and 
you won't have issues.

BTW ... you are using old calendar plugin which has almost reached EOL.

https://myroundcube.com/myroundcube-plugins/beta

Original comment by roland.l...@gmail.com on 15 Dec 2014 at 4:52

GoogleCodeExporter commented 8 years ago
Hmm, then something else must be wrong.
I don't use CalDAV as backend, just "database". But it doesn't get stored 
anywhere except the `events` table.

The version im using is from 2014, the "new" one still says 'beta' so i didn't 
look at it yet.
I might have a look at the beta one.

Original comment by pe...@petern.nl on 15 Dec 2014 at 5:28