MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Event Calendar - Advanced - bug with navigation and display update  (Mono Support )

Viewed 50069 time(s), 29 post(s) 4/9/2012 8:48:54 AMby Jeremy
khorvat

khorvat

4/18/2012 9:02:40 PM
Hi,

please find the URL in your InMail inbox. 

Let me know if the Calendar issue is resolved, after the upgrade.

Regards

This content has not been rated yet. 
15993 Reputation 2214 Total posts
Jeremy

Jeremy

4/19/2012 10:08:20 PM
Thank you for the updated version of MonoX. I have downloaded it and will begin testing soon.
This content has not been rated yet. 
322 Reputation 36 Total posts
Jeremy

Jeremy

4/20/2012 10:18:36 AM
I have installed the updated version (MonoX v4.7.40.3486 [4/18/2012], DB v4.7.3321) and a new error when deleting a calendar reference using the web part properties has appeared. I have tried resetting the page web parts but it doesn't help.

Was I meant to run any database update scripts? There didn't seem to be any extra scripts from the last version.

The calendar reference delete worked in the last version, but now I get the following error message:

2012-04-20 20:13:37,352 [33] ERROR MonoX [BaseHttpApplication] - Application Error
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> SD.LLBLGen.Pro.ORMSupportClasses.ORMQueryExecutionException: An exception was caught during the execution of an action query: The DELETE statement conflicted with the REFERENCE constraint "FK_CalendarEventEntry_Calendar". The conflict occurred in database "aajeremy", table "dbo.CalendarEventEntry", column 'CalendarId'.
The statement has been terminated.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception. ---> System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_CalendarEventEntry_Calendar". The conflict occurred in database "aajeremy", table "dbo.CalendarEventEntry", column 'CalendarId'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute()
--- End of inner exception stack trace ---
at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute()
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteActionQuery(IActionQuery queryToExecute)
at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.DeleteEntity(IEntity2 entityToDelete, IPredicateExpression deleteRestriction)
at MonoSoftware.LLBLGen.Repository.DeleteEntity(IEntity2 entityToDelete)
at MonoSoftware.MonoX.CalendarEditorPart.#dr(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

This error has stopped me from testing the last error because I was going to delete a calendar in order to add a new one.
This content has not been rated yet. 
322 Reputation 36 Total posts
Jeremy

Jeremy

4/20/2012 11:38:53 AM
I have done some further testing. It seems that the calendar delete function has been changed from a way to remove a calendar being displayed on a particular web part to being an actual delete of the calendar in the repository. Luckily for me, the delete failed (see previous error message posted) because there were database relationships between the calendar and the data in the calendar. Previously the delete just deleted the reference to the calendar on the web part, which makes sense to me. The actual calendar remained in the repository and was therefore still available after a web part delete to assign to new web parts and to continue to function on other web parts that were using the same calendar. This is a reasonable use of a single calendar because there are two viewing modes (Simple and Advanced) which serve different purposes. In one context, people may prefer the simple view but that doesn't mean that the advanced view is no longer useful, and vice versa. So it could be useful to be able to display a single calendar in multiple web parts.

I have confirmed the functionality change of the delete by sucessfully deleting an empty calendar. I verified that the calendar deleted was removed from the database, and naturally it was also removed from the web part as well.

My sugestion is that the calendar delete function in the web part properties is renamed to "Remove" to avoid further confusion. The remove function would then serve to remove a calendar from a web part, but leave the calendar and its data in the repository for re-use. If a delete calendar function is needed, it probably belongs in a separate area to the web part properties and should be aware of all the uses of the calendar such as multiple web part dependencies and calendar data. Perhaps a warning could be issued when people try to delete a calendar with related events. It might even be appropriate to make people manually remove each reference to the calendar in web parts manually before allowing a delete.

Personally I do not like delete functions that actually delete data because people are used to having an undo function or a recycle bin. I think content management systems benefit from having at least a two step delete process. The first delete would hide the data, so that it appears to be deleted but it is only archived. The second delete would occur on the archived or recycle bin data by an administrator if the space needs to be freed up, or the archive has been moved to alternative storage (say backup media).
This content has not been rated yet. 
322 Reputation 36 Total posts
Jeremy

Jeremy

4/20/2012 12:15:38 PM
More test results.

Calendar to display in the web part properties now works. Clicking on the input for the calendar to display produces a drop down list of all the calendars available to display. After a calendar is chosen from the drop down list, the drop down list will only display that calendar. This is because the input box filters the list of items shown in the drop down list. Naturally enough the only match is the selected calendar. The filter would be useful if someone had hundreds of calendars to choose from. To choose a different calendar, the text in the input box needs to be removed, in effect removing the filter on the drop down list. Then the available calendars are displayed again for selection in the drop down list. So, it works perfectly, but it is not obvious that the input box is also a filter. This could be remedied by an inline explanation or a checkbox to switch the drop down list filtering on or off.

The add calendar button also works. I have been able to add a new calendar to a web part and confirmed that it displayed and was in the repository. New events are able to be added to the new calendar.

So all the previous bugs have been fixed. The navigation works, the calendar to display works and the add calendar works. Could you let me know your preference for managing this post?

I think that the original problem was solved with the last beta version and therefore this post should be marked as answered. However, you may like to keep this discussion alive considering that the scope is limited to a version of monox that is not public and will have little relevence to people in the future. If you would like me to open a fresh thread for the delete problem in the latest beta, then please let me know.
This content has not been rated yet. 
322 Reputation 36 Total posts
pajo

pajo

4/20/2012 2:39:55 PM
Hi Jeremy,

Thanks for your feedback there are some interesting suggestions.

To answer your original question, delete should remove calendar with it's entries from database, not just remove it from the module. So it's a bug. We're going to do some enchantments on calendar system and modules for next release.

We're going to let you know when calendar delete issue will be fixed in one of the next unofficial release.

This content has not been rated yet. 
629 Reputation 83 Total posts
khorvat

khorvat

5/3/2012 9:39:20 PM
Hi,

I have sent you the link to latest MonoX version, let us know if you need anything.

Regards
Rated 5.00, 1 vote(s). 
15993 Reputation 2214 Total posts
Jeremy

Jeremy

5/4/2012 9:56:16 PM
Thank you for the new version. The delete button works exactly as described by pajo.

The delete button deletes the calendar along with all of the events stored in the calendar for every web part that was using the calendar.

I appreciate that you removed the filtering from the calendar to display drop down box. I think it makes it more useable.

It seems like my other suggestions did not make it into this version of the calendar. I understand that there are other priorities.

So this is the behaviour by design:

There is no "Are you sure?" confirmation before the delete even though the delete button is right beside the add button. The ajax loading image displays and then the "Calendar to display" input box is cleared. There is no message to indicate that there are existing events in the calendar and that the events will also be deleted. There is no recycle bin and no undo option. When the calendar was being used in multiple web parts, there is no message to advise that the calendar will be deleted from the other web parts as well. There is no remove calendar button.
This content has not been rated yet. 
322 Reputation 36 Total posts
khorvat

khorvat

5/17/2012 8:07:55 AM
Hi,

sorry for so late answer, we have scheduled some of your suggestions and they will be included in some of the upcoming versions. Please find the ulr to latest MonoX build in your InMail Inbox.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
1 2 3