Home › Forums › Calendar Products › Community Events › Redirect URL not configurable
- This topic has 12 replies, 2 voices, and was last updated 10 years, 7 months ago by
Brian.
-
AuthorPosts
-
August 25, 2015 at 7:49 am #998790
Oliver
ParticipantHi 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,
OliverAugust 25, 2015 at 9:11 am #998851Brian
MemberHi 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
August 25, 2015 at 9:39 am #998858Oliver
ParticipantHi 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,
OliverAugust 25, 2015 at 10:58 am #998875Brian
MemberOh my bad I forgot to add it:
the-events-calendar-community-events\src\Tribe\Main.php
August 26, 2015 at 4:09 am #999083Oliver
ParticipantHi 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,
OliverAugust 26, 2015 at 7:17 am #999135Brian
MemberOh 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'August 26, 2015 at 9:57 am #999200Oliver
ParticipantHi 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.
August 26, 2015 at 10:03 am #999203Oliver
ParticipantTadaaa! 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?
August 27, 2015 at 7:35 am #999565Brian
MemberOk 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/listeAre 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/listHowever, 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/listeEven with that Ultimate Member Plugin Active.
August 27, 2015 at 1:54 pm #999727Oliver
ParticipantHi 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=0Are you are able to reproduce this behavior?
Best regards,
Oliver-
This reply was modified 10 years, 8 months ago by
Oliver.
August 28, 2015 at 8:22 am #999921Brian
MemberThanks 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?
August 30, 2015 at 11:47 am #1000308Oliver
ParticipantHi 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=0Thanks a lot for your time & patience!
OliverAugust 31, 2015 at 6:49 am #1000429Brian
MemberI 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!
-
This reply was modified 10 years, 8 months ago by
-
AuthorPosts
- The topic ‘Redirect URL not configurable’ is closed to new replies.
