Trailing slashes needed in three functions

Home Forums Calendar Products Community Events Trailing slashes needed in three functions

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #20482
    Jen
    Participant

    I was running a link checker today and noticed that a number of links generated in the grid view are missing their trailing slashes. The links aren’t broken, but they require a redirect and it slows things down.

    The three functions that I found (at least initially) that need trailing slashes added are tribe_get_previous_month_link(), tribe_get_next_month_link(), and tribe_get_linked_day(). I can patch the output of the first two through the views, but the last one is trickier.

    I thought I’d ask for a fix in the next update, since it’s an easy one and will clean things up a little. Thanks!

    #20484
    Jen
    Participant

    Oops, the third function is actually getLink(), not tribe_get_linked_day(), and refers only to the ‘day’ case.

    #20486
    Jen
    Participant

    OK, it looks like all the trailing slash problems trace back to getLink(), but I’ll let y’all figure it out. I see you also have a function trailingslashit() that could be used to clean it up.

    #20528
    Rob
    Member

    This is a solid suggestion, Jen – thanks for the heads up here. I’ve passed this on to Paul for review and it looks straightforward enough that we could include it in July’s maintenance release (which should be out in that first week of July). Let me know if you notice anything else along these lines or if we can help in any other way.

    #20554
    Jen
    Participant

    Thanks, Rob! I also found some double-slashed links in the grid, so a good look-see at the getLink() function and a liberal application of trailingslashit() should solve everything.

    #20588
    Rob
    Member

    Nice – thanks, Jen. Noted and passed along to the dev on this end, too. Anything else comes to mind…just give us a shout.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Trailing slashes needed in three functions’ is closed to new replies.