mediawiki-extensions / mw-calendar

Automatically exported from code.google.com/p/mw-calendar
0 stars 2 forks source link

Redirect on Event Page not Displaying as Expected on the Calendar #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
THE ISSUE

The issue is:

- When I use #REDIRECT on an Event page, the CONTENT'S first line and then 
TOC of the redirect target is displayed in the Calendar. 

- I expect just the Page TITLE to be displayed in the calendar.

With regards to the CONTENTS of the destination page, a number of lines 
shows on the calendar. I have tried having Line 1 have text, Line 2 being 
blank, Line 3 having text expecting that the calendar display stops at the 
blank line, but this doesn't work.

VERSIONS

I had this issue with Calendar v3.7.0.3 (2/2/2009).  I just upgraded to 
v3.7.7.1 (5/6/2009) but it is still occuring. 

I am using MediaWiki v1.14.0

WORKED EXAMPLE

Some Specifics of my example:

- Calendar is on page: "Buying Calendar"
- The Calendar is called (also): "Buying Calendar"
- New Event is created: "Buying Calendar/Buying Calendar/5-4-2009 -Event 1"
- Workaround contents of the event page is (2 lines):
'''Activity W/C 04.05'''
* [[Promo Activity W/C 04.05.2009]]

- The "Destination page" I am wanting to get users to is: "Promo Activity 
W/C 04.05.2009"
- This setup shows on the Calendar (month view) "Activity W/C 04.05" (the 
first line of the event content).

It fails when:

-  I change the event Content to be (1 line):
#REDIRECT [[Promo Activity W/C 04.05.2009]]

In this case the first line of content and the TOC of the page "Promo 
Activity W/C 04.05.2009" is displayed. The text is below (asterisk used 
for bullet that is shown on the calendar):

* __NOTOC__
* This Weeks Promotional Ac...
* LY Promotional Activity
* Local Marketing
* Important Upcoming Events

The first line of my destination page is the __NOTOC__ as I want this 
hidden on the destination page. The following 4 lines are the Level 2 
headings ie "== blah ==" of the page.

DESIRED RESULT

For the Calendar, I would love the following to be what happens:

- If the Event Body is normal wikitext, then display the contents as you 
currently do.

- If the Event Body a one line redirect to a page, just show that Page 
Title as the entry in the Calendar. 

My thoughts are that it wouldn't be too much of a hassle, as the 
desitination page name is in the REDIRECT "tag". This also assumes that 
the destination of the redirect doesn't redirect again, but I think that 
is a fair enough limitation if it has to be that way.

RELATED BUG?

I think this is similar to the bug report "Issue 47:  Links on events" but 
that seems to be closed. 

Note that I don't want to use the {{:Page Title}} notation, as I want 
the "destination" page to be the one the user interacts with.

Original issue reported on code.google.com by proberts...@gtempaccount.com on 11 May 2009 at 3:55

GoogleCodeExporter commented 8 years ago
The whole calendar premis is based on line 1 being the event title. I can't 
change 
that logic or it would mess up the "move" option that users sometimes use to 
change 
events to other "days". Granted, I can technically "code" anything but I'm not 
really sure I want to complicate the logic that tries to determine whether the 
user 
wants to "move" an event as opposed to REDIRECTs to non-calendar pages and then 
using that page name as the event instead of line 1...

It's a good point about the page sections though. I'm surprised no one else had 
expressed that issue. I think the only option here is yet another preference 
to "disable" sectionevents. My current "usesectionevents" is misleading as that 
prefence should more read "forcesectionevents"

I'm open to discussion as there may be something I can do... but need to really 
sit 
back and think about it

Original comment by kenyu73 on 11 May 2009 at 9:19

GoogleCodeExporter commented 8 years ago
Thanks for your response and explaination.

I am happy for the calendar premis to remain and Line 1 be the event title. 
(So, 
please ignore my suggestion to use the title as the Event title.)

However, with a Redirect, the current version still isn't working correctly as 
the "Event Title" in the calendar is still showing "Line 1, then the TOC".

Ah! After reading your response, as I have typed this, the "penny has just 
dropped" 
that the Calendar is treating a Level 2 section of a wiki content page as a 
"Section 
Based Event" as outlined at http://www.mediawiki.org/wiki/Extension:Calendar_
(Kenyu73)/Readme#Section_Based_Events   

Hence, the first line is showing as an event, then the "Level 2 Sections" are 
showing as a section based event.

I tried changing my destination page to change my Level 2 heading to Level 3, 
but 
that failed to. It took the first two "==" of the "=== blah ===" and then 
created a 
Section based event of "= blah =" (don't know if this is a bug...)

So, I agree that another preference.

My suggestion is (the long winded) "usesectioneventsonredirect". 

By default, I suggest to have this DISABLED. The reasoning is that if you 
redirect 
to a wiki page, then it is probably a "normal" wiki page which might have lots 
of 
other information about an event. 

This prference would be ENABLED intentionally if the destination wiki page is 
a "Calendar Event Page" which has events in the format specified in your 
Readme.  

Anyway, that is my contribution to the discussion so far. Thanks for a great 
Wiki 
Extension.

PaulR

Original comment by proberts...@gtempaccount.com on 12 May 2009 at 12:43

GoogleCodeExporter commented 8 years ago
adding 'disablesectionevents'

This stops the calendar from using sections as individual events.

Original comment by kenyu73 on 11 Aug 2009 at 3:08

GoogleCodeExporter commented 8 years ago
v3.8.2

Original comment by kenyu73 on 11 Aug 2009 at 3:53