Dropdown nav not working with widgetized sidebar

Home Forums Calendar Products Events Calendar PRO Dropdown nav not working with widgetized sidebar

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #30017
    Ann Foley
    Participant

    I’m working on theme that displays the Events calendar a on page with dynamic(widgetized) sidebar. I’m using a modified version of ecp-page-template.php in a an events directory I made in my theme, per your directions.

    ecp-page-template.php calls the sidebar like this: ,

    and sidebar-events.php has this code blah blah ,

    and the secondary sidebar is registered in functions.php.

    With this setup, the dropdown calendar month and year selectors lead to a mostly blank page. For example, if I change the year from 2012 to 2007 using the dropdown, everything from the page header down disappears. The url in the address bar displays this: http://localhost:8888/events/undefined2007-12

    And this appears on the debug log:
    • Request:
    • events/undefined2008-12

    • Query String:
    • name=undefined2008-12&category_name=events

    • Matched Rewrite Rule:
    • (.+?)/([^/]+)(/[0-9]+)?/?$

    • Matched Rewrite Query:
    • category_name=events&name=undefined2008-12&page=

    Here’s what I’ve done to troubleshoot this error.

    I disabled all other plugins. Didn’t change it.

    I tried the calendar in Twenty Twelve, Twenty Eleven and Twenty Ten. The error reproduces only in Twenty Ten.

    I tried a non-wigetized sidebar on the Events page. That works just fine. Alas, there’s a widget plugin that I want to use on all my pages so this isn’t a solution.

    If you could help out with this it would be great. I’m aware it will be next week before I hear anything.

    Thanks

    #30019
    Ann Foley
    Participant

    Here’s the code without comment-killing angle brackets:

    ecp-page-template.php calls the sidebar like this: php get_sidebar(‘events’); ,

    and sidebar-events.php has this code: php if ( ! dynamic_sidebar( ‘secondary’ ) ) : blah blah <?php endif; ,

    and the secondary sidebar is registered in functions.php.

    #30025
    Barry
    Member

    Hi Ann – sorry about the issue with “comment-killing angle brackets”! We’re aware that is a pain in the neck and for the time being the best solution is to use a service like Pastebin or Gist and then link back to your code.

    Anyway, back to the real problem. What jumps out (as it did for you) was the form of the URL.

    http://localhost:8888/events/undefined2007-12

    There’s either a missing forward slash or even a completely unwanted element in there (“undefined”) and clearly that is causing some confusion here.

    Can I ask what your permalink setting is?

    #30027
    Ann Foley
    Participant

    Permalink setting is custom: /%category%/%postname%/

    And no worries about the angle bracket issue – I’ll know for next time.

    #30029
    Barry
    Member

    Hi Ann: if you’re still in the testing stage could you try changing the permalink setting to /%postname%/ and see if that resolves the problem (it may not) just so I can get a better bead on this?

    Thanks!

    #30045
    Ann Foley
    Participant

    Hi Barry –
    I fixed it on my own. I wasn’t registering the widgetized sidebars correctly in functions.php, which probably added an extra / in there somewhere and goofed up the dropdown menus.

    It led to other errors, too, so I went to the Codex to double-check my code and figured it out. When I had the code straightened out, the Events dropdowns worked fine.

    Many thanks for your quick replies!

    Ann

    #30048
    Barry
    Member

    No problem – I’m glad you’re all sorted here 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Dropdown nav not working with widgetized sidebar’ is closed to new replies.