Redirect URL not configurable

Home Forums Calendar Products Community Events Redirect URL not configurable

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #998790
    Oliver
    Participant

    Hi Barry,

    after migrating to Events Calendar /Community Events 3.11.x on our productive system I realized a weird behaviour:
    The redirect URL, which is set in the backend is ignored, it always redirects to “domain.com/events/community/list”, whatever I configure in the backend.

    As I need a quick workaround can you tell me in which php file or translation file I can overwrite this URL?

    Thanks in advance for a quick answer!

    Best regards,
    Oliver

    • This topic was modified 10 years, 8 months ago by Oliver.
    • This topic was modified 10 years, 8 months ago by Brian.
    #998851
    Brian
    Member

    Hi Oliver,

    Sorry for the issues.

    Are you saying this field is not updating:

    Events > Settings > Community Tab > “Community rewrite slug”

    I was able to change this field “Community rewrite slug” and it worked for me.

    On the front end these urls worked:

    yoursite.de/events/community/hinzufuegen/

    yoursite.de/events/community/liste/

    So if it is not updating for you there maybe a conflict with something on your site and our conflict guide could help narrow it down:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    Temporary Option
    As for manually setting the slug you could modify this file:

    And change this around line 817:

    return $events_slug.'/'.$this->communityRewriteSlug;

    To this while editing yourslughere to the slug you would like:

    return $events_slug.'/yourslughere';

    You would then want to resave permalinks and see if that works.

    Let me know what you find out.

    Thanks

    #998858
    Oliver
    Participant

    Hi Brian,

    yes, it’s exactly here, what I’m talking about:
    Events > Settings > Community Tab > “Community rewrite slug”
    I tried a lot of other workarounds to get it run but with no success.

    Just to keep our productive website running with the workaround:
    In which file do I have to change the code?

    Best regards,
    Oliver

    #998875
    Brian
    Member

    Oh my bad I forgot to add it:

    the-events-calendar-community-events\src\Tribe\Main.php

    #999083
    Oliver
    Participant

    Hi Brian,

    I tried the temporary option, but unfortunately it doesn’t work. The code you gave me overwrites the community-slug (domain.com/events/COMMUNITY/hinzufuegen), but not the “hinzufuegen”. Is there a way to overwrite the “hinzufuegen” part of the URL by e.g. changing the code?

    Best regards,
    Oliver

    #999135
    Brian
    Member

    Oh my bad the coding works as intended since you cannot change the ‘add’ (hinzufuegen) slug in the url in the admin I did not think you were referring to that.

    The hinzufuegen is included in the translation file so that is one place to change it.

    Otherwise in that file above on line 2553 you could change the wording in this function:

    public function init() {
    $this->communityRewriteSlug = $this->getOption( 'communityRewriteSlug', 'community' );

    $this->rewriteSlugs['edit'] = sanitize_title( __( 'edit', 'tribe-events-community' ) );
    $this->rewriteSlugs['add'] = sanitize_title( __( 'add', 'tribe-events-community' ) );
    $this->rewriteSlugs['delete'] = sanitize_title( __( 'delete', 'tribe-events-community' ) );
    $this->rewriteSlugs['list'] = sanitize_title( __( 'list', 'tribe-events-community' ) );

    $this->rewriteSlugs['venue'] = sanitize_title( __( 'venue', 'tribe-events-community' ) );
    $this->rewriteSlugs['organizer'] = sanitize_title( __( 'organizer', 'tribe-events-community' ) );
    $this->rewriteSlugs['event'] = sanitize_title( __( 'event', 'tribe-events-community' ) );

    self::maybeLoadAssets();
    }

    I would change it from this:

    __( 'add', 'tribe-events-community' )

    to this:

    'yourword'

    #999200
    Oliver
    Participant

    Hi Brian,

    thanks for the code. I use it and change the ‘list’ to:
    $this->rewriteSlugs['list'] = 'liste';

    Unfortunately it doesn’t work (even I think your code is correct).

    I found the reason for it (but have still no solution):
    There is an incompatibility between TEC and the plugin “Ultimate Member”.
    Whenever I install and activate this plugin, the slug configured in the backend of TEC is overwritten by ‘http://www.treffpunkt-jazz.de/events/community/list’.

    As I have no idea how the overwrite work in TEC neither in Ultimate Member I’m really lost now.
    Any idea how to fix this?

    Maybe you can install Ultimate Member on your test system (it’s a free plugin)?

    Best regards,
    Oliver

    • This reply was modified 10 years, 8 months ago by Oliver.
    #999203
    Oliver
    Participant

    Tadaaa! I tried your second workaround: I just changed the translation of “list” to “list” and now it works!

    That’s great for the moment, but maybe we can still figured out why the Ultimate Member Plugin is incompatible to be safe for future problems?

    #999565
    Brian
    Member

    Ok glad there is at least a temporary solution.

    I loaded up the Ultimate Member Plugin and switched to German in my site.

    These two links still worked:

    mysite.com/events/community/hinzufuegen
    mysite.com/events/community/liste

    Are those the correct links for you? and did they work?

    I was able to change community to another slug and it worked.

    Also, these two links under the text box did not change for the translation. They always showed as add or list when I was in German.

    mysite.com/events/community/add
    mysite.com/events/community/list

    However, the community slug would change.

    Even though those two links looked like that in the admin these links always worked:

    mysite.com/events/community/hinzufuegen
    mysite.com/events/community/liste

    Even with that Ultimate Member Plugin Active.

    #999727
    Oliver
    Participant

    Hi Brian,

    thanks for installing the Ultimate Member Plugin. Everything you described is right and I can reproduce it on my website.

    Unfortunately I think I didn’t explain detailed enough the problem I have, therefore I will do it now:

    1. Both UM + ETC are installed and active
    2. Create a new user with the “subscriber” role (that’s very important, it doesn’t work with the “admin” role)
    3. Login with this user
    4. After login you will be redirected to domain.com/events/community/list instead of the URL configured in the redirect field under Settings -> Community -> Redirect-URL. Whatever I put in there it just get’s ignored:
    https://www.dropbox.com/s/w3rk8ok3g60o439/Screenshot%202015-08-27%2023.08.15.png?dl=0

    Are you are able to reproduce this behavior?

    Best regards,
    Oliver

    • This reply was modified 10 years, 8 months ago by Oliver.
    #999921
    Brian
    Member

    Thanks for the image. That helps figure out the field. This field Umleitungs-URL sets a url to redirect a user when they try to access the admin. It is not a url to redirect on login.

    If you use the login form we create on the Community Events Page it should keep you there.

    Where are you having users login on your site?

    #1000308
    Oliver
    Participant

    Hi Brian!

    that was the perfect hint! After having another look at the places where redirects happen I found the right place!

    In the Ultimate Member Login form there is a redirect option, which I configured (but completely forgot, as I had done this already 1-2 months ago):
    https://www.dropbox.com/s/d6zc46v2ucmxe3q/Screenshot%202015-08-30%2020.42.31.png?dl=0

    Thanks a lot for your time & patience!
    Oliver

    #1000429
    Brian
    Member

    I am glad to see you were able to figure it out.

    I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.

    Thanks!

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Redirect URL not configurable’ is closed to new replies.