Bugs & Suggestions

  • nargin
  • nargin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 1 month ago #551 by nargin
nargin created the topic: Bugs & Suggestions
Hi

I just started using SimpleCalendar a few days ago and I it's a great fit! After using it for some time now I have discovered some issues I'd like to report here.

1. Reserve Date Bug
There seems to be a bug regarding the reserve date in the backend. When I edit an existing event and I save the results, the date value of the 'reserve date' field is reduced by one, e.g. if it reads 20.11.2014, after saving, the date is 19.11.2014. If I hit the save button again, the date is again decreased by one day.
I checked my DB logs and indeed the wrong query is issued to the database. I had a brief look at the code, but since I'm not really familier with the joomle framework I couldn't find the parts responsible for the query.

2. Category View Bug
Not sure whether this is a SimpleCalendar bug, but this is how it goes: When search engine friendly URLs are activated in the global configuration ($sef = '1'; configuration.php) and a SimpleCalendar category alias starts with a number, then category view for this catogory does not work in the frontend.
For instance, if I show events from all categories and then click on that particular category on the top of the view, I get a "404 page not found" in the area of the website where the calendar content should be shown.
This error does not occur when only the category name starts with a number, but the alias starts with a letter. This error also does not occur when SEF URLs are deactivited. Thus, I suspect this is due to some URL parsing / due to the fact that the category alias is part of the URL.

3. Suggestion: Schema Update for 'description' field in DB
The description field for events in the DB is VARCHAR(255). For our use case, this is clearly not enough (detailed event description, participant requirements, ...). Also, the big text editor suggest alot of information can be placed in the field, which is not the case. In our installation I changed the field type to TEXT and I suggest this be integrated into the official package.

4. Use Case Suggestion: Application Deadlines
Now this is simply related to how we use SimpleCalendar, but it might be interesting for you. We use SimpleCalender to manage national training courses and events offered in our youth organization. These events have application deadlines. To support this, I renamed the reserve date into application deadline and I also modified mod_simplecalender to support sorting by reserve date. That way, we can show both on our website, upcoming events as well as upcoming application deadlines for these events.
For me as a non-web developer, it was easiest to repurpose the existing date field rather than learning the joomla framework and the solution works fine. But maybe you want to introduce this functionality as a seperate field into the official packages (I'm happy anyways :cheer: )

The above refers to SimpleCalendar 3.0.10 running on Joomla 3.3.6.

Thanks again for the great product,
nargin

Please Log in or Create an account to join the conversation.

More
3 years 3 weeks ago #552 by admin
admin replied the topic: Bugs & Suggestions
Thanks, we will look for this bugs for future releases.
Best regards
Fabrizio

Please Log in or Create an account to join the conversation.

  • nargin
  • nargin's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 1 month ago #686 by nargin
nargin replied the topic: Bugs & Suggestions
Hi Fabrizio

Since I'm already bug hunting I traced down the Reserve Date Bug as well. That was a nasty one. Here's the fix and explanation.

The reserve_dt field of the event form has the user_utc filter enabled. The start and end date don't have that filter. Now when the user_utc filter tries to correct the reserve date for the timezone, the day is reduced since I'm ahead of UTC. Here's an example: In the backend, I set the reserve date to 12.11.2020. When I hit 'store', the POST-Request sends this value to the server. Now since the server is in Switzerland, I'm in timezone UTC+1. Correcting for the timezone, the filter returns the date 2020-11-11 23:00:00 which is then stored in the DB. So finally, SimpleCalendar displays the reserve date 11.11.2020. So basically that 1-hour correction reduces the stored date.

There are several ways to fix this, e.g. adding a time to the reserve date or correct the date for the timezone when reading it out from the DB again. I decided to remove the timezone filter altogether, yet that wasn't enough. While the start and end date are properly reformatted for the SQL statement in the event JTable check function, the reserve date is not. Adding the reserve date reformatting solved the issue for me.

Hope you can include this or another solution in an upcoming release.
Cheers,
Nargin

com_simplecalendar/admin/models/forms/event.xml | 3 +--
 com_simplecalendar/admin/tables/event.php       | 3 ++-
 com_simplecalendar/site/models/forms/event.xml  | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/com_simplecalendar/admin/models/forms/event.xml b/com_simplecalendar/admin/models/forms/event.xml
index 6110fcc..312e556 100644
--- a/com_simplecalendar/admin/models/forms/event.xml
+++ b/com_simplecalendar/admin/models/forms/event.xml
@@ -47,7 +47,6 @@
 		
 		<field name="reserve_dt" type="date" class="inputbox"
 			label="COM_SIMPLECALENDAR_EVENT_FIELD_RESERVE_DATE_LABEL" size="22"
-			filter="user_utc" 
 			description="COM_SIMPLECALENDAR_EVENT_FIELD_RESERVE_DATE_DESC" />
 			
 		<field name="alias" type="text" class="inputbox"
@@ -186,4 +185,4 @@
 			rows="3" cols="30" label="JFIELD_META_DESCRIPTION_LABEL"
 			description="JFIELD_META_DESCRIPTION_DESC" />
 	</fieldset>
-</form>
\ No newline at end of file
+</form>
diff --git a/com_simplecalendar/admin/tables/event.php b/com_simplecalendar/admin/tables/event.php
index 0cf0a28..337a8c8 100644
--- a/com_simplecalendar/admin/tables/event.php
+++ b/com_simplecalendar/admin/tables/event.php
@@ -138,8 +138,9 @@ class SimplecalendarTableEvent extends JTable
 		$reserve_date = date('Y-m-d', strtotime($this->reserve_dt));
 		if ( $reserve_date == '1970-01-01' || $reserve_date == '0000-00-00' ||  $this->reserve_dt == '' || $this->reserve_dt == null )
 		{
-			$this->reserve_dt = $this->_db->getNullDate();
+			$reserve_date = $this->_db->getNullDate();
 		}
+		$this->reserve_dt = $reserve_date;
 
 		// Add http:// to website URL if available
 		if ( $this->contact_website != '' && 
diff --git a/com_simplecalendar/site/models/forms/event.xml b/com_simplecalendar/site/models/forms/event.xml
index e0a9376..4cc207d 100644
--- a/com_simplecalendar/site/models/forms/event.xml
+++ b/com_simplecalendar/site/models/forms/event.xml
@@ -47,7 +47,6 @@
 		
 		<field name="reserve_dt" type="date" class="inputbox"
 			label="COM_SIMPLECALENDAR_FIELD_RESERVE_DATE_LABEL" size="22"
-			filter="user_utc" 
 			description="COM_SIMPLECALENDAR_FIELD_RESERVE_DATE_DESC" />
 			
 		<field name="alias" type="text" class="inputbox"
@@ -188,4 +187,4 @@
 			namespace="event"
 		/>
 	</fieldset>
-</form>
\ No newline at end of file
+</form>

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago - 1 year 6 months ago #775 by admin
admin replied the topic: Bugs & Suggestions
Sorry, it got lost in the heap of messages
1) will remove "user_utc" in the upcoming 3.1.1 version of SC (will hit the download section this evening)
2) Should be fixed (routing has been reviewed for 3.1.x)
3) Fixed as per 3.1.0 (released)
4) Thanks but at this time I focus on existing features. You can request new features in the "Suggestion Box" ( software.albonico.ch/kunena/suggestion-box.html ), please one at a time with a meaningful title)
Thanks again for your help
Fabrizio
Last Edit: 1 year 6 months ago by admin.

Please Log in or Create an account to join the conversation.

Time to create page: 0.268 seconds
Powered by Kunena Forum