Menu

#17 Calendar retrieving links to pages causing 404 error

open
nobody
None
5
2007-05-23
2007-05-23
Adam
No

Currently when building the calendar display within the ec3_get_calendar() function, eventcalendar retrieves all rows from the posts table and associates the results with the appropriate day with a link to the page using the following URL syntax:

http://<sitename>/archives/date/<year>/<month>/<day>

The problem is that when building this list, the query retrieves ALL data from the posts table including pages and WordPress is not able to retrieve a page using the date based URL format above. The result is a 404 error for any pages shown in the calendar.

Suggested fix:

Edit the ec3_util_calendar_days() function within the template-functions.php file and add the following line to the second SELECT clause:

AND post_type='post'

This will now only retrieve posts rather than posts and pages and 404 page not found errors disappear.

Discussion

  • ivan matveyev

    ivan matveyev - 2008-06-05

    Logged In: YES
    user_id=2108663
    Originator: NO

    hm.. wordpress 2.5.1 - the same problem. fix doesn't work. any suggestions?

     
  • ivan matveyev

    ivan matveyev - 2008-06-06

    Logged In: YES
    user_id=2108663
    Originator: NO

    fixed here: http://wpcal.svn.sourceforge.net/viewvc/wpcal?view=rev&revision=284

    thanks to all of you guys! it all works fine now. seems to be the best wp calendar plugin ever.

     

Log in to post a comment.

MongoDB Logo MongoDB