Home › Forums › Calendar Products › Community Events › Community Events submission form replicates itself in secondary sidebar
- This topic has 24 replies, 6 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
November 27, 2012 at 7:25 am #28541
Casey
ParticipantI’m going to go ahead and close out this thread, but will re-open when we have more information. Thanks!
November 27, 2012 at 1:27 pm #28575Jonah
ParticipantTodd & Victoria, just a quick question, are either of you using the shortcode to display the form instead of the auto permalink? If you don’t know what I’m talking about then you’re likely using the auto permalink.
Thanks,
JonahNovember 27, 2012 at 1:56 pm #28580Todd
ParticipantI was not using the ShortCode, since the docs say “Keep in mind that shortcodes are only available for users who have permalinks turned off; this method will NOT work if you’re running with a pretty permalinks structure”.
But just for kicks, i just now created a new page (though i do have pretty permalinks on), and placed the shortcode “[tribe_community_events]” in the page. When it hit that page (site.com/my-events-2/) the url redirects to http://site.com/events/community/add, and I see the bug we’ve been discussing.
I then tried the other ShortCode “[tribe_community_events_title]”, and this way, the page does not redirect away from site.com/my-events-2/, and the bug is not present. However the only thing that IS on the page that comes from Community Events plugin is the text “Submit an event”. No form or list, etc.November 28, 2012 at 1:20 am #28596Victoria
ParticipantI’m not using the shortcode, but I did the same thing Todd did and when I used the “[tribe_community_events]” I get the same error.
November 28, 2012 at 1:25 am #28597Timothy Wood
ParticipantThank you both for testing the shortcodes. I know they are not meant purposefully to be used if pretty permalinks are on, but I have seen in a few cases where they work fine. Currently with the way WP_Router is embedded in the code there is no silver bullet to fix this within our plugin (one is coming soon). The alternative would be to use a custom sidebar without the offending widget just for the community submission pages if that is possible?
November 29, 2012 at 1:12 pm #28714Todd
ParticipantI just found a super-simple solution! I’m now using get_page() instead of WP_Query().
$page_content = “”;
$page_id = 464;
$page_data = get_page( $page_id );
$page_content = apply_filters(‘the_content’, $page_data->post_content);
echo $page_content;November 30, 2012 at 5:11 am #28740Timothy Wood
ParticipantTodd that’s is a good fix and I am glad it works for you. Please note that since it’s hardcoded the page id we couldn’t use that as a fix for everyone 🙂
November 30, 2012 at 9:23 am #28768Todd
ParticipantYes the page_id is hardcoded. But so were the original custom queries i had been doing with WP_Query. The purpose of my custom queries (in header.php and footer.php) that conflict with wp_router, and thus Community Events, is to allow the site owner to edit content that appears in the header and footer of the site. So I suppose i could do it based on a slug or post-title instead of an ID, but whichever i use, it will always be hardcoded, since it’s not content based on the requested url / permalink.
December 3, 2012 at 5:00 pm #28874Jonah
ParticipantI’m going to close this out since there’s nothing else we can do until 3.0
Thanks all!
– Jonah
July 7, 2015 at 6:26 am #978269Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Community Events submission form replicates itself in secondary sidebar’ is closed to new replies.
