WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[Events Manager Plugin] Event Detail Links Not Working - Fresh Install (26 posts)

  1. rpbender
    Member
    Posted 2 years ago #

    Yesterday I installed the latest version of EM and when you click on the event details link it goes to the 404 page.

    I saw that there were problems with this previously, but I thought that was fixed in this version? It appears that the code mentioned in those posts is already present in this version.

    I installed the free version as a trial as I was planning on upgrading to the paid version if I could get this working easily.

  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    are you using permalinks?

    it might be worth updating your permalinks (if turned on), e.g. go to Settings ~ Permalinks and save.

  3. rpbender
    Member
    Posted 2 years ago #

    Yes, I am using the permalinks and I already had tried going and saving to try to update the settings.

    Unfortunately, It didn't do anything. Links still go to 404 pages.

  4. agelonwl
    Member
    Posted 2 years ago #

    hello,

    does you server rewrite module is enable?

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    permalinks should be working normally now.

    firstly, did you check that you have an events page selected in Events > Settings > Event Page? it could also be a plugin (or even a theme) conflict, so you could try disabling your other plugins and reverting to 2010 theme to see if one of those fixes it.

    if not, are you on IIS? if so there has been one single case where this just didn't work and so you have to add

    define('EM_DISABLE_PERMALINKS',true);

    to your wp-config.php file

  6. BerndSch
    Member
    Posted 2 years ago #

    I have the same/similar problem. I installed EM on a newly installed wordpress instance. I didn't installed any other plugin or theme and I didn't edit any setting. It's just an default wordpress installation.
    The first page, where the 3 example events were listed, works fine. But If I click on the link for the event detail (http:/domain.com/?event_id=1) the example post from the wordpress installation appears.
    It doesn't matter if I click on the link for the event 1,2 or 3. WordPress always load the example post page.

    The wordpress installation is on a webfaction server and was created through the webfaction admin panel. So I couldn't really tell which webserver is used on the server. But I think it's nginx.
    What settings have to be done on the server that the plugin works? I would create a new support ticket on webfaction, but I don't know what I should tell what exactly the problem is?!

  7. chriscooper3000
    Member
    Posted 2 years ago #

    I have the same issue as BernSch except I am hosting my own server.

  8. BerndSch
    Member
    Posted 2 years ago #

    So far as I debugged the code I think the error is in line 13 in the "em-events.php" file

    if ( get_the_ID() == $events_page_id && $events_page_id != 0 ) {

    On my installation the "get_the_ID()" function always returns 1 for the event detail page. It returns 4 for the event list page, which is correct. The event page has the id 4. But why returns the function for all event detail pages the ID=1?

  9. rpbender
    Member
    Posted 2 years ago #

    Adding define('EM_DISABLE_PERMALINKS',true); to the config file does allow the event detail links to work. Obviously they are now formatted with just the event_id in the URL but that's fine for the event section.

    Thanks for your help!

  10. chriscooper3000
    Member
    Posted 2 years ago #

    Thanks rpbender - I tried this for my issue and still had no joy

    Links still goes to my latest post?

  11. BerndSch
    Member
    Posted 2 years ago #

    @rpbender:
    I've also tried to add
    define('EM_DISABLE_PERMALINKS',true);
    to my wp-config.php file.

    But as chriscooper3000 has pointed out before - it didn't work :-(

  12. chriscooper3000
    Member
    Posted 2 years ago #

    Found my issue - maybe it is the same for you BerndSch?

    Whenever I did a fresh install of the Events Manager I always made the Events page the front page of my site in the reading settings.

    By doing this, it displays the url without the

    ?page_id=4

    therefore - when clicking on the events it would error.

    By not having it as the front page always ensures the link goes to

    ?page_id=4&event_id=1

    For me I will now not use the Events page as front page.

  13. BerndSch
    Member
    Posted 2 years ago #

    @chriscooper3000: thanks for the information. This works for me too

  14. chriscooper3000
    Member
    Posted 2 years ago #

    @BerndSch: just to add - I have managed to add my events list to a new static page by using

    [events_list limit="5"]

    in the page content - I have then used this as my frontpage and it all works ok.

    Good Luck

  15. BerndSch
    Member
    Posted 2 years ago #

    @chriscooper3000
    Thanks, this works also fine on my site ;-)

  16. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    I've noted this down and will check this out and see. In the meantime, are you having issues with the front page only?

    Are you also having issues with permalinks and disabled the permalinks only in EM using the recommended code above?

  17. chriscooper3000
    Member
    Posted 2 years ago #

    Hi Marcus,

    Yes it was just when I set the Events page as the Front Page.

    Permalinks are all sorted - thanks

  18. jmeher
    Member
    Posted 2 years ago #


  19. wethanet
    Member
    Posted 2 years ago #

    Same issue running IIS7 Windows 2K8, and the following worked for me.

    define('EM_DISABLE_PERMALINKS',true);
    to my wp-config.php file.

    I'm not sure whether or not this is an acceptable solution, and would love to hear if anyone has permalinks working correctly on IIS for Event Manager.

  20. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    this will get solved eventually.

  21. bismafs
    Member
    Posted 2 years ago #

    Same problem here. The event link won't work if the events page used as front page. Hope it will be fixed soon.

  22. videoandfun
    Member
    Posted 2 years ago #

    Hey Guys, I have the same problem!
    Here is my "hard-coded" solution:

    Edit the index.php of your WordPress-Theme and post for example in this file:

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     */
    
    get_header(); ?>
    
    		<div id="primary">
    			<div id="content" role="main">
    <?
    $events = EM_Events::get( apply_filters('em_content_events_args', $args) );
    $args['limit'] = get_option('dbem_events_default_limit'); //since we are passing this info to an output function or template, we should get all the events first
    $args['page'] = (!empty($_REQUEST['page']) && is_numeric($_REQUEST['page']) )? $_REQUEST['page'] : 1;
    $events_count = count($events);
    
    if( get_option('dbem_events_page_search') ){
    	em_locate_template('templates/events-search.php',true);
    }
    if( $events_count > 0 ){
    	//If there's a search, let's change the pagination a little here
    	if(!empty($_REQUEST['_wpnonce']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'search_events')){
    		$args['pagination'] = false;
    		echo EM_Events::output( $events, $args );
    		//do some custom pagination (if needed/requested)
    		if( !empty($args['limit']) && $events_count > $args['limit'] ){
    			//Show the pagination links (unless there's less than $limit events)
    			$search_args = EM_Events::get_post_search() + array('page'=>'%PAGE%','_wpnonce'=>$_REQUEST['_wpnonce']);
    			$page_link_template = preg_replace('/(&|\?)page=\d+/i','',$_SERVER['REQUEST_URI']);
    			$page_link_template = em_add_get_params($page_link_template, $search_args);
    			echo apply_filters('em_events_output_pagination', em_paginate( $page_link_template, $events_count, $args['limit'], $args['page']), $page_link_template, $events_count, $args['limit'], $args['page']);
    		}
    	}else{
    		echo EM_Events::output( $events, $args );
    	}
    }else{
    	echo get_option ( 'dbem_no_events_message' );
    }
    ?>
    			</div><!-- #content -->
    		</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  23. Pirchner
    Member
    Posted 2 years ago #

    The "event link" issue still exists for me (WP 3.3, StudioPress theme "Manhattan 1.0"; Event Manager 4.305). I've checked that the plugin is configured correctly, so I guess it's a problem with the permalink structure. If set to the default /?p=xxx the link to the single event page works as it should, but if I use any of the other permalink settings the link doesn't call the single event page but loads the event listing (i.e. itself).
    Due to the server setup the custom permalink setting requires to put in "/index.php/" so it looks like e.g. /index.php/%postname%/
    That doesn't work for the Event Manager plugin (though no problems with that for the rest of the site!).
    Any ideas how to go about? Already spent 4 hours today on that trying to figure things out.
    Your help is highly appreciated.

  24. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    Aside from:

    Same issue running IIS7 Windows 2K8, and the following worked for me.
    
    define('EM_DISABLE_PERMALINKS',true);
    to my wp-config.php file.

    You could try the beta, as this now should be fixed.

  25. Pirchner
    Member
    Posted 2 years ago #

    define('EM_DISABLE_PERMALINKS',true); - seems to work (as far as I can tell from a quick check).

    But there's another (unrelated) problem: Now I get the warning:
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /{path}/wp-config.php:1) in /{path}/wp-content/plugins/events-manager/classes/em-notices.php on line 11

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /{path}/wp-config.php:1) in /{path}/wp-content/plugins/events-manager/classes/em-notices.php on line 11

    Any idea what might be causing this?

  26. Pirchner
    Member
    Posted 2 years ago #

    Okay, I solved the "warning" issue: it was caused by the text editor (UltraEdit). Codepage was set to UTF-8. UE then puts some extra characters before the <?php tag but doesn't show them.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic