OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How to prefix all routes

This topic contains 11 replies, has 4 voices, and was last updated by  Mike Kudelya 7 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #35704

    seangofus
    Participant

    Hi,

    I am trying to prefix all routes in the OroBAP. This is a relatively straight-forward thing to do in Symfony, yet I am running into an infinite loading screen. I have tried the following code in the routing.yml file.

    Like I stated above this produces an endless blue loading screen where the page never actually loads. I have tried sifting through the logs but have found nothing. Any insight on how I can go about prefixing all routes would be much appreciated.

    Thanks,
    -Sean

Viewing 11 replies - 1 through 11 (of 11 total)
  • Author
    Replies
  • #35705

    Alexandr Smaga
    Participant

    Hi.

    It’s strange, did you tried to clear cache or reinstall with modified config ? There was some issue related, but it’s already fixed. We will publish 1.2 in the nearest 2-3 days, please check it out.

    #35706

    seangofus
    Participant

    Yes I did try clearing my cache. I also tried running oro:install after adding the prefix to the config. Neither worked for me. I can see all the routes have the new prefix in the router:debug, but I am still getting the endless loading bar when trying to access a route.

    #35707

    Alexandr Smaga
    Participant

    I will try to find out what happens. Will keep you posted.

    #35708

    seangofus
    Participant

    I have just tried the 1.2 update and it seems prefixes work now. However I am getting “This webpage has a redirect loop” (in chrome) when trying to get to the user login page with a prefix. When I take the prefix off it works. I am unsure how to get around this.

    #35709

    Alexandr Smaga
    Participant

    Hello.

    I tried to prefix routes with following lines in routing.yml

    Also changes in security.yml required

    Hope this will help.

    #35710

    seangofus
    Participant

    Thank you for taking the time to look into this. I tried the same security.yml settings that you provided and I am getting an exception with the following message “Full authentication is required to access this resource.” I am getting this upon login (/app_dev.php/admin/user/login). Please let me know if there is anymore information I can provide to you. Thanks.

    #35711

    Alexandr Smaga
    Participant

    Yes, my bad I forgot that also need to remove this line from security.yml

    #35712

    seangofus
    Participant

    Perfect. Thank you again for helping me through this issue. Prefixes are now working for me.

    #35713

    anatolii
    Participant

    Hi! I tried to do the same changes for my application and met following errors:

    ( ! ) LogicException: The check_path “/login_check” for login method “oauth” is not matched by the firewall pattern “^/admin/”. in ../vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php on line 292

    As i understand this is because following line in security.yml:

    And such route definition is present in ../vendor/oro/platform/src/Oro/Bundle/DistributionBundle/Resources/config/routing.yml

    What am i doing wrong? My ORO version is 1.7.0.

    In addition: Is there some way to move all ORO BAP functionality to path /admin/ and leave login functionality on URLs without prefix (/login)?

    #35714

    anatolii
    Participant

    Any advise, guys? Still got problems with this task.

    #35715

    Mike Kudelya
    Participant

    Hi @anatolii,

    Also you have missed delete this line, only for test, of course.

    in /Library/WebServer/www/symfony/orocrm-application/app/config/security.yml

    and set

    in vendor/oro/platform/src/Oro/Bundle/SSOBundle/Resources/config/oro/app.yml

    Also you need create listener, which will redirect you to right url after logout

    src/Custom/Bundle/OroBundle/EventListener/LogoutListener.php

    This is example how you can do this very fast. Of course you need extend SSOBundle and override app.yml

    In addition: Is there some way to move all ORO BAP functionality to path /admin/ and leave login functionality on URLs without prefix (/login)?

    Did you mean that the link must be without /user/login?

Viewing 11 replies - 1 through 11 (of 11 total)

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top