I'm getting there. I had to do a number of things:
Now, the problem I have is that the function is pretty much useless. On the Create Event page > Location Configure ... Yes, the map shows up, but the Search function does nothing. Also, the map you can zoom in and out, and can drag the little man, but how do you make it accept the location you're at? I'm not sure if this is a half-baked feature or if I'm still having some configuration issue behind.
Update on Fixing Event Manager Problems
This is an update on my week long adventure with the Event Manager plugin and what I have learned so far about reducing errors and getting it to work. I am currently trying to get Event Manager to work in an XAMPP server private test environment and also in a different Linux server Cpanel File Manager public facing website environment.
First, the Event Manager plugin is one of the largest plugins in terms of file size and almost as big as the entire Elgg folder. Unzip the Event Manager folder and you will see that it has a file size of 34.3 MB. This is way more than is allowed to install plugins in Elgg. The limit is 8 to 10 MB.
In my case, I was able to install and activate the Event Manager. But it did not work well because it was missing a lot of files and folders. I solved this problem by adding the following lines to the Elgg generated ht access file. (click on show hidden files to see and open this file):
php_value post_max_size 50M
php_value upload_max_filesize 50M
php_value max_input_time 120
Add these 3 lines just above the rewrite rules. Placing these values lower in the ht access file will cause them to override the default values.
When I did this, the Event Manager installed properly on XAMPP and on the Cpanel version.
Folder owner and Permissions Problems
XAMPP has security permissions that make it difficult to modify files. The owner is a group called daemon. The simple solution to this problem is to right click on the Elgg folder and change the permissions to 777. This allows anyone to make changes on the file. The slightly more complex solution is to make myself a member of the daemon group. I chose the simply solution. The result was that the Event Manager calendar worked well even without running the composer update I discuss below! This leads me to believe that my underlying problem with the Cpanel version of the Event Manager is one of incorrect group ownership or file permissions (which is hard for me to believe because I checked and they are both the same as all other Elgg plugins).
Composer Update Issues
I did not even bother running the Composer update of the Event Manager on the XAMPP install since the Event Manager was working fine on the XAMPP install. But I did as suggested above to update composer for the cpanel installation.
First, I contacted my web host who confirmed that composer was installed on the server. Then opened Cpanel, scrolled down to the Advanced section and clicked on the terminal to open it.
I then enter this line to move to the correct folder
cd public_html/mod/event_manager
Then copy pasted this line:
composer -vvv install
This command installed and updated a bunch of ColdTrick dependencies. The resulting Event Manager folder had a file size of 39.2 MB. So running the composer update added 1000 files and 5 MB to the file size.
I then flushed the cache and reactivated the Event Manager. The good news is that the Calendar finally displays when I click on the Calendar tab of the Events page. The bad news is that, unlike my XAMPP installed Event Manager, any new events I create are not shown on the Calendar Manager.
Cpanel Folder permissions are 755 and file permissions are 644, I did not change the owner to wwwdata because I think that only applies to a private LAMPP install where elgg is in the wwwdata folder (maybe I am wrong).
I have spent several days trying to fix this problem. But I am at a loss as to what the problem might be. Any suggestions would be greatly appreciated.
Regards,
David Spring
Just an update if someone hits the same issue with the Events Calendar plugin. I decided to go back to Elgg 2.3 and the plugin works there nicely! I am able to see the map, search for a location, see the pins for the events and everything. The calendar view also worked fine, but unfortunately I am encountering problems. After the system is running for a while, the events no longer appear in the Calender view. I have not investigated the problem in deep because of other priorities, but will get back to that and post here once I find a resolution.
Thank you both for your suggestions. I will look at the examples you provided and try to learn more about how to use a Bootstrap class and declare it in the elgg-plugin.php file. While I am pretty good at HTML, CSS and writing documentation, I am still learning PHP.
For others interested in learning more about how to move code from start.php to elgg-plugin.php using the bootstrap class, there are a couple of Elgg tutorials that might help:
http://learn.elgg.org/en/stable/guides/plugins.html
see also this guide
http://learn.elgg.org/en/stable/guides/plugins/bootstrap.html
You don't have to add a bootstrap class for every plugin. It depends on what's in start.php. You already found the two links I would have added, too. The explanation at the first link contains a full example of a elgg-plugin.php with all possible options in the array. Maybe this help to get an idea which definitions could be moved from start.php to elgg-plugin.php. It's mainly the exceptions (e.g. if-clauses to only add some elements conditionally) that might better be done within a bootstrap class. Also, code beyond the init function in start.php could be moved into another file ("library") to be loaded in elgg-plugin.phg using require_once(). Or it might be possible to move this code into a class of its own.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.