texxasrulez / calendar

GNU Affero General Public License v3.0
14 stars 14 forks source link

Calendars showing up, but no appointments inside #2

Closed SKB-CGN closed 4 years ago

SKB-CGN commented 4 years ago

Hi, the calendar plugins pulls my 4 calendars from nextcloud, but it doesnt show up the appointments inside those cals. Even the database "caldav_events" is empty, but "caldav_calendars" has the found calendars in it.

Is it a real problem, to have the nextcloud reachable under "https://cloud.domain.tld" and roundcube via "https://webmail.domain.told"?

I was using the old version a long, long time, but now it was time to upgrade ;-)

texxasrulez commented 4 years ago

Did you run the command composer run-script post-install-cmd from plugins/calendar directory as per the main README.md? Also, as per the README.md I do not support subdomains. You have to setup proxies and the likes to make that work ...

SKB-CGN commented 4 years ago

Hi, the composer command did not work. How should the composer command be run? I copied the file manually. But first without success. After some time I visited my webmail again and the calendars showed some entries, but now one calendar is copied into a different calendar and everything is very, very slow. Do you have some ideas?

texxasrulez commented 4 years ago

This Repo HAS to be installed via composer. If you do manually install it, there are lots of loops to go through, so just easier to install via composer. I suggest to delete calendar, libcalendaring and libkolab folders. Drop all tables involved with this plugin. Install this plugin in a terminal from root of Roundcube using 'composer require texxasrulez/calendar:0.0.7' for php7.2 or higher or php7.1 or lower, use composer require texxasrulez/calendar:0.0.6. Once composer is done, then change directories to /roundcube_mail_root/plugins/calendar and then just type composer run-script post-install-cmd, a little text should come up stating "Success .. All day event fixed" and then it will work ..

SKB-CGN commented 4 years ago

Thanks for figuring out. I'll give it a try tomorrow. I installed it today via composer - only thing, which didn't work was the post-command. Therefore I manually copied the file. One question here: when I reinstall it later and it asks me, if I would enable libkolab and libcalendaring - is the answer yes or no? 👍 Sure, for calendar its yes, but for those 2? Thank you!

texxasrulez commented 4 years ago

Either way works. I always say no on those two since the calendar plugin loads them itself. Since very little info out there on composer particulars, I plan on figuring out a way for it to stop asking plus have composer run that last little script automatically until I figure out true cause of all day event bug. It is because of vobject v3.x to v4.x changes, just haven't found it yet. Never fret, this old man will find it ...

SKB-CGN commented 4 years ago

I tried it now again - what shall i say? It's working 👍 But the installation needed some manual creation of the databases, because i use some prefix for my tables. Perhaps, you are able to implement that :) I didnt need to setup any proxies o.a. Also, what i do not understand: I have 4 calendars in my nextcloud - Personal, Birthday of contacts (generated by NC), public holidays and vacation days for germany. All calendars are stored with their referencing id in the database except the birthday of contacts. They are stored with the ID of my personal calendar and with the birthday calendar ID. So, they are stored doubled in the database.

texxasrulez commented 4 years ago

Did you install via composer? It uses the database info you placed in your main Roundcube config and will inject schema into appropriate tables, with or without prefix. I have tested on both, my main production RC has no prefix and my sandbox RC has a prefix and have no issues here ....

texxasrulez commented 4 years ago

On birthday calendar I cannot recreate this issue. Make sure that the check box in calendar settings in Roundcube Settings tab for birthday calendar is NOT checked. This does not work as expected right now and I have added an annotation in config file stating as such. Do you have any logs to share? What database are you using? What OS are you using? What kind of RC install do you have? (shared hosting install, localhost install or a docker install, etc .... ) Please provide as much info as you can so we can figure this out since I cannot recreate on my system.

SKB-CGN commented 4 years ago

Yes, i installed it via composer. I think, it could be an error with the following creation: CREATE TABLE IF NOT EXISTScaldav_calendars( calendar_idint(11) UNSIGNED NOT NULL AUTO_INCREMENT, user_idint(10) UNSIGNED NOT NULL DEFAULT '0', namevarchar(255) NOT NULL, colorvarchar(8) NOT NULL, showalarmstinyint(1) NOT NULL DEFAULT '1', caldav_urlvarchar(1000) DEFAULT NULL, caldav_tagvarchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 'COLLATE', caldav_uservarchar(1000) DEFAULT NULL, caldav_passvarchar(1000) DEFAULT NULL, caldav_oauth_providervarbinary(200) DEFAULT NULL, readonlyint NOT NULL DEFAULT '0', caldav_last_change` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

PRIMARY KEY(calendar_id), INDEX caldav_user_name_idx (user_id, name), CONSTRAINT fk_caldav_calendars_user_id FOREIGN KEY (user_id) REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE ) /!40000 ENGINE=INNODB / /!40101 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci /; ` where the referencing "users" is also containing the prefixes, which are not inserted - perhaps only on my system.

I am using my own Server which is running FreeBSD and the Webserver is inside a Jail. I am using MariaDB as a database.

texxasrulez commented 4 years ago

I have never ran across the table 'users' with a prefix on a Roundcube install and I have installed hundreds if not thousands of Roundcube setups over the years. Strange ... Can you export your db and post the schema for me? Just the structure, no data needed and I will see what I can do on that.

SKB-CGN commented 4 years ago

Sure, here you go. roundcube_db.txt

texxasrulez commented 4 years ago

Danke ... I assume you are German from your sql file. What part of Germany are you from? You don't have to answer, I am just curious and want to know more about all peoples and cultures. I know very little German but I do have lots of German friends from Muenster Texas so I picked up a word or two from them. My favorite beer (or Bier) is Shinerbock, made in Shiner Texas from an old German recipe. Good stuff. I was in the Navy in the early '90s and traveled quite a bit but never got the pleasure to visit Deutschland. I am (mostly) of Northern European decent, German, Polish and English, so we could be cousins ... LOL

I will see what can be done on the prefix ... I am closing this issue since your original problem is resolved but I will still see what I can do on schema for prefixes. I gotta do a little thinking about that. In the meantime, I would suggest to clone my repo and change schema for your db if you require to install in the future then just change texxasrulez to StefCGN in composer.json file so you can install it via composer from your modified repo for ease and convenience.

SKB-CGN commented 4 years ago

Thank you, for sorting this out and having a look 👍 yes, you are right, i am from germany. I do not want to post in a plubic area the things which belong to my private base. If you want, you can write me a PM :)