zikula / core

Zikula Core Framework
GNU Lesser General Public License v3.0
238 stars 66 forks source link

zikulausersmodule_access_login route does not exist #3295

Closed MrMontesa closed 7 years ago

MrMontesa commented 7 years ago
Q A
Zikula Version 1.4.4
PHP Version 5.6.26

Expected behavior

Display the page properly.

Actual behavior

I git a few complaints from users that they receive error 500 when accessing entry page of Zikula. I wasnt able to reproduce this myself and asked them to clear their browser caches. Then I tried Firefox 50.0.2 on my Linux Workstation and saw the error myself. Also my users confirmed they are using Firefox. The error message is as follows:


Oops! An Error Occurred
The server returned a "500 Internal Server Error".
Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "zikulausersmodule_access_login" as such route does not exist.") in "ZikulaAndreas08Theme::home.html.twig" at line 3.

Steps to reproduce

Install zk 1.4.4 use Andreas08 theme open ZK page in Firefox 52

Edit: I only use English language. No translations

craigh commented 7 years ago

what is your line 3 of ZikulaAndreas08Theme::home.html.twig ?

the default line is

{% set topnavblock = showblockposition('topnav') %}

I'm guessing yours is not.

MrMontesa commented 7 years ago
[user@server ~/htdocs/staging.amc-idstein/themes/Andreas08Theme/Resources/views]$ head -3 home.html.twig 
{{ include('@ZikulaAndreas08Theme/Include/header.html.twig') }}
<div id="theme_navigation_bar" class="row">
    {% set topnavblock = showblockposition('topnav') %}

Yes, its default.

craigh commented 7 years ago

then, I think the data is dynamic. check your blocks assigned to topnav

MrMontesa commented 7 years ago

I have the default "User log-in" and an additional "my_menue" block in there.

On disabling the user log-in block, the page loads again.

craigh commented 7 years ago

I don't know what those mean. My suggestion is that the User log-in or login-in block may have misconfigured settings.

craigh commented 7 years ago

old default may not be new default.

MrMontesa commented 7 years ago

I never touched User-Login block. It was default when installing 1.4.3 and got recently updated to 1.4.4. User Login block contains following custom filter config: _route != zikulausersmodule_access_login which seems ok to me as its the same in a fresh 1.4.4 install

Guite commented 7 years ago

Can not replicate on my local host using 1.4.4-final.

MrMontesa commented 7 years ago

Whats the best approach to troublehsoot this in my setup? Can I somehow list routes? Whats the difference in routes when using additionally installed languages?

I also havent heard any more complaints from my users.

Portugao commented 7 years ago

Cannot replicate! @MrMontesa Did you set a startpage in the general settings?

MrMontesa commented 7 years ago

Yes, I'm using news as start module.

rallek commented 7 years ago

I have seen a similar error message during the time @Guite was fixing some issues in Modulestudio. Unfortunately I can not say wich of the bugs he fixed than.

Can it be another module is mixing up something in the routing?

craigh commented 7 years ago

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "zikulausersmodule_access_login" as such route does not exist.") in "ZikulaAndreas08Theme::home.html.twig" at line 3.

Here is line 3 of the template:

{% set topnavblock = showblockposition('topnav') %}

confirm your line 3 is the same please.

MrMontesa commented 7 years ago

Are you requesting different info to what I gave 8 days ago? One of the first comments. It's default Andreas theme. No changes. Let me know if you need more info.

rallek commented 7 years ago

is it line 3 or line 4?

craigh commented 7 years ago

Are you requesting different info to what I gave 8 days ago?

sorry. I didn't read carefully.

I still think the problem is dynamic.

craigh commented 7 years ago

can you please enable debug and reproduce the error. provide the full trace. thanks

Portugao commented 7 years ago

@MrMontesa What about disable the start module?

Kaik commented 7 years ago

Please check logs go to var/log/httpd/error_log (Fedora) or find same logs in your distro it should say more...( open log file and refresh page with error, opened log should indicate changed file, last entries will be ones you are looking for) Try to disable all block's and see if error still occurs... You can list routes using dev/debug mode and toolbar (app/config/parameters.yml env: dev, debug: true ) or in console in zikula root folder run php app/console list for all commands the one you are interested in is php app/console debug:router

MrMontesa commented 7 years ago

Thanks for all the input provided. @Portugao its not related to start module. Behavior is the same no matter if start module is set or not @rallek its line 3 as stated in the error messages and seen from my head output @Kaik Thanks much for the insights. Unfortunately its an externel hosted page with limited access to error_logs. I checked them and havent seen any valuable information _php app/console debug:router |grep accesslogin gave follwoing result:

[user@w31 ~/htdocs/staging.amc-idstein]$ php app/console debug:router |grep access_login
  en__RG__zikulausersmodule_access_login                                   ANY        ANY      ANY    /login/{returnUrl}

@craigh I did some more debugging and it indeed seems to be something in my setup. I havent been able to reproduce it exactly the same way with identical error message. But while debugging I found another way that also spits home.html.twig line3 error but in a different context which leads to bad permissions or error in Menutree permission checking. Will file a seperate bug to be on the safe side, but need some more analysis in order to give proper reproduce instructions.

rallek commented 7 years ago

I enabled the user login block in center. I can not replicate the error.

Guite commented 7 years ago

@MrMontesa can you reproduce the error also without the German language pack? Maybe it is related to some obsolete route translation, similar to https://github.com/zikula/core/issues/3343#issuecomment-269910117

MrMontesa commented 7 years ago

I cannot reproduce this at all right now. Indeed I have removed german translation a few tests back but cannot recall exactly at which point in time. Since even I cant repoduce this, let close this issue. I'll open another one in case a more reproduceable issue orrures.