View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 18120 | Bug reports | Menu system | public | 2022-05-17 15:44 | 2023-06-15 12:06 |
| Reporter | hydroid7 | Assigned To | |||
| Priority | none | Severity | minor | ||
| Status | closed | Resolution | unable to reproduce | ||
| Product Version | 5.3.x | ||||
| Summary | 18120: Server Error 500 when editing global settings: alias "application.controllers.admin.GlobalSettings" invalid | ||||
| Description | With the mentioned version the server returns 500 when the page Alias "application.controllers.admin.GlobalSettings" ist ungültig. | ||||
| Steps To Reproduce | Create a new directory : ./mymodules Throw error 500 | ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 5.3.13+220509 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | Firefox | ||||
| Database type & version | MySQL | ||||
| Server OS (if known) | Linux web21a 4.19.0-20-amd64 #1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 | ||||
| Webserver software & version (if known) | FPM/FastCGI | ||||
| PHP Version | 7.4.27 | ||||
|
Filed pull request: https://github.com/LimeSurvey/LimeSurvey/pull/2424 |
|
|
With toplink i have index.php?r=admin/globalsettings |
|
|
PS : debug mode : https://manual.limesurvey.org/Debug_mode |
|
|
|
|
Can not reproduce , neither with PATYH or with GET url … And : my file are : /data/webdev/master/application/controllers/admin/globalsettings.php I add a tracevar at line 201 of AdminController : $action is still globalsettings for me … |
|
|
With the fix CException.html (12,794 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CException</title>
<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}
body {
font: normal 9pt "Verdana";
color: #000;
background: #fff;
}
h1 {
font: normal 18pt "Verdana";
color: #f00;
margin-bottom: .5em;
}
h2 {
font: normal 14pt "Verdana";
color: #800000;
margin-bottom: .5em;
}
h3 {
font: bold 11pt "Verdana";
}
pre {
font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}
pre span.error {
display: block;
background: #fce3e3;
}
pre span.ln {
color: #999;
padding-right: 0.5em;
border-right: 1px solid #ccc;
}
pre span.error-ln {
font-weight: bold;
}
.container {
margin: 1em 4em;
}
.version {
color: gray;
font-size: 8pt;
border-top: 1px solid #aaa;
padding-top: 1em;
margin-bottom: 1em;
}
.message {
color: #000;
padding: 1em;
font-size: 11pt;
background: #f3f3f3;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 1em;
line-height: 160%;
}
.source {
margin-bottom: 1em;
}
.code pre {
background-color: #ffe;
margin: 0.5em 0;
padding: 0.5em;
line-height: 125%;
border: 1px solid #eee;
}
.source .file {
margin-bottom: 1em;
font-weight: bold;
}
.traces {
margin: 2em 0;
}
.trace {
margin: 0.5em 0;
padding: 0.5em;
}
.trace.app {
border: 1px dashed #c00;
}
.trace .number {
text-align: right;
width: 2em;
padding: 0.5em;
}
.trace .content {
padding: 0.5em;
}
.trace .plus,
.trace .minus {
display:inline;
vertical-align:middle;
text-align:center;
border:1px solid #000;
color:#000;
font-size:10px;
line-height:10px;
margin:0;
padding:0 1px;
width:10px;
height:10px;
}
.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
display: none;
}
.trace-file {
cursor: pointer;
padding: 0.2em;
}
.trace-file:hover {
background: #f0ffff;
}
/*]]>*/
</style>
</head>
<body>
<div class="container">
<h1>CException</h1>
<p class="message">
L'alias « application\controllers\admin\globalsettings » est invalide. Vérifiez qu'il pointe vers un fichier PHP existant. </p>
<div class="source">
<p class="file">/data/webdev/master/framework/YiiBase.php(289)</p>
<div class="code"><pre><span class="ln">277</span>
<span class="ln">278</span> if(($pos=strrpos($alias,'\\'))!==false) // a class name in PHP 5.3 namespace format
<span class="ln">279</span> {
<span class="ln">280</span> $namespace=str_replace('\\','.',ltrim(substr($alias,0,$pos),'\\'));
<span class="ln">281</span> if(($path=self::getPathOfAlias($namespace))!==false)
<span class="ln">282</span> {
<span class="ln">283</span> $classFile=$path.DIRECTORY_SEPARATOR.substr($alias,$pos+1).'.php';
<span class="ln">284</span> if($forceInclude)
<span class="ln">285</span> {
<span class="ln">286</span> if(is_file($classFile))
<span class="ln">287</span> require($classFile);
<span class="ln">288</span> else
<span class="error"><span class="ln error-ln">289</span> throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file and the file is readable.',array('{alias}'=>$alias)));
</span><span class="ln">290</span> self::$_imports[$alias]=$alias;
<span class="ln">291</span> }
<span class="ln">292</span> else
<span class="ln">293</span> self::$classMap[$alias]=$classFile;
<span class="ln">294</span> return $alias;
<span class="ln">295</span> }
<span class="ln">296</span> else
<span class="ln">297</span> {
<span class="ln">298</span> // try to autoload the class with an autoloader
<span class="ln">299</span> if (class_exists($alias,true))
<span class="ln">300</span> return self::$_imports[$alias]=$alias;
<span class="ln">301</span> else
</pre></div> </div>
<div class="traces">
<h2>Stack Trace</h2>
<table style="width:100%;">
<tbody><tr class="trace app expanded">
<td class="number">
#0 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/data/webdev/master/application/controllers/AdminController.php(219): <strong>YiiBase</strong>::<strong>import</strong>() </div>
<div class="code"><pre><span class="ln">214</span> if (!empty($aOverridenCoreActions)) {
<span class="ln">215</span> if (!empty($aOverridenCoreActions[$action])) {
<span class="ln">216</span> $this->currentModuleAction = $action; // For subviews rendering, see: AdminController::renderPartial()
<span class="ln">217</span>
<span class="ln">218</span> // Since module's class has the same name has core class, we need to load the core and module classes with namespace
<span class="error"><span class="ln error-ln">219</span> Yii::import('application\\controllers\\admin\\' . $action, true);
</span><span class="ln">220</span> $sActionModuleClass = 'lsadminmodules\\' . $action . '\controller\\' . $action;
<span class="ln">221</span> Yii::import($sActionModuleClass, true);
<span class="ln">222</span> }
<span class="ln">223</span> }
<span class="ln">224</span> }
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#1 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/data/webdev/master/application/controllers/AdminController.php(199): <strong>AdminController</strong>-><strong>runModuleController</strong>() </div>
<div class="code"><pre><span class="ln">194</span> $this->redirect(array('/admin/authentication/sa/login'));
<span class="ln">195</span> }
<span class="ln">196</span> }
<span class="ln">197</span> }
<span class="ln">198</span>
<span class="error"><span class="ln error-ln">199</span> $this->runModuleController($action);
</span><span class="ln">200</span> tracevar($action);
<span class="ln">201</span>
<span class="ln">202</span> return parent::run($action);
<span class="ln">203</span> }
<span class="ln">204</span>
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#2 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/data/webdev/master/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">277</span> {
<span class="ln">278</span> list($controller,$actionID)=$ca;
<span class="ln">279</span> $oldController=$this->_controller;
<span class="ln">280</span> $this->_controller=$controller;
<span class="ln">281</span> $controller->init();
<span class="error"><span class="ln error-ln">282</span> $controller->run($actionID);
</span><span class="ln">283</span> $this->_controller=$oldController;
<span class="ln">284</span> }
<span class="ln">285</span> else
<span class="ln">286</span> throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
<span class="ln">287</span> array('{route}'=>$route===''?$this->defaultController:$route)));
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#3 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/data/webdev/master/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>() </div>
<div class="code"><pre><span class="ln">136</span> foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
<span class="ln">137</span> $_GET[$name]=$value;
<span class="ln">138</span> }
<span class="ln">139</span> else
<span class="ln">140</span> $route=$this->getUrlManager()->parseUrl($this->getRequest());
<span class="error"><span class="ln error-ln">141</span> $this->runController($route);
</span><span class="ln">142</span> }
<span class="ln">143</span>
<span class="ln">144</span> /**
<span class="ln">145</span> * Registers the core application components.
<span class="ln">146</span> * This method overrides the parent implementation by registering additional core components.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#4 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/data/webdev/master/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div>
<div class="code"><pre><span class="ln">180</span> public function run()
<span class="ln">181</span> {
<span class="ln">182</span> if($this->hasEventHandler('onBeginRequest'))
<span class="ln">183</span> $this->onBeginRequest(new CEvent($this));
<span class="ln">184</span> register_shutdown_function(array($this,'end'),0,false);
<span class="error"><span class="ln error-ln">185</span> $this->processRequest();
</span><span class="ln">186</span> if($this->hasEventHandler('onEndRequest'))
<span class="ln">187</span> $this->onEndRequest(new CEvent($this));
<span class="ln">188</span> }
<span class="ln">189</span>
<span class="ln">190</span> /**
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#5 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/data/webdev/master/index.php(192): <strong>CApplication</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">187</span> require_once APPPATH . 'core/LSYii_Application' . EXT;
<span class="ln">188</span>
<span class="ln">189</span> $config = require_once(APPPATH . 'config/internal' . EXT);
<span class="ln">190</span>
<span class="ln">191</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">192</span> Yii::createApplication('LSYii_Application', $config)->run();
</span><span class="ln">193</span>
<span class="ln">194</span> /* End of file index.php */
<span class="ln">195</span> /* Location: ./index.php */
</pre></div> </td>
</tr>
</tbody></table>
</div>
<div class="version">
2022-05-18 09:55:50 nginx/1.18.0 <a href="http://www.yiiframework.com/">Yii Framework</a>/1.1.24-dev </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");
var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if(collapsedReg.test(trace.className))
trace.className = trace.className.replace("collapsed", "expanded");
else
trace.className = trace.className.replace("expanded", "collapsed");
}
}
}
/*]]>*/
</script>
<div id="grammalecte_menu_main_button_shadow_host" style="width: 0px; height: 0px;"></div></body><script src="CException_fichiers/api.js"></script></html> |
|
|
The hosting is a shared web hosting. I can send further details if you want. Isn't the error because of the method in AdminController? |
|
|
Yes, but why it's happen for you and not for me … renaming globalsettings for me broke … Seems to be linked to module : 'globalsettings' => Then :
|
|
|
Wasn;t reproducible. Collecting more feedback. |
|
|
There are a way vi config to disable module ? |
|
|
@hydroid7 , if possible : Can you send your config.php file (removing DATABASE access) I want to reproduce the issue for a better fix. |
|
|
Sure, I attached it to this message. |
|
|
limesurvey_config.php (2,455 bytes)
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| 'connectionString' Hostname, database, port and database type for
| the connection. Driver example: mysql. Currently supported:
| mysql, pgsql, mssql, sqlite, oci
| 'username' The username used to connect to the database
| 'password' The password used to connect to the database
| 'tablePrefix' You can add an optional prefix, which will be added
| to the table name when using the Active Record class
|
*/
return array(
'components' => array(
'db' => array(
'connectionString' => 'mysql:host=localhost;port=3306;dbname=greensurvey;',
'emulatePrepare' => true,
'username' => 'mysql',
'password' => '',
'charset' => 'utf8',
'tablePrefix' => 'lime_',
),
// Uncomment the following line if you need table-based sessions
// 'session' => array (
// 'class' => 'application.core.web.DbHttpSession',
// 'connectionID' => 'db',
// 'sessionTableName' => '{{sessions}}',
// ),
'urlManager' => array(
'urlFormat' => 'get',
'rules' => array(
// You can add your own rules here
),
'showScriptName' => true,
),
),
// Use the following config variable to set modified optional settings copied from config-defaults.php
'config'=>array(
// debug: Set this to 1 if you are looking for errors. If you still get no errors after enabling this
// then please check your error-logs - either in your hosting provider admin panel or in some /logs directory
// on your webspace.
// LimeSurvey developers: Set this to 2 to additionally display STRICT PHP error messages and get full access to standard templates
'debug'=>0,
'debugsql'=>0, // Set this to 1 to enanble sql logging, only active when debug = 2
// Update default LimeSurvey config here
)
);
/* End of file config.php */
/* Location: ./application/config/config.php */
|
|
|
@DenisChenu responding to you previous questions, I didn't updated any of the configurations. |
|
|
I don't understand why you don't load module here … I take the fix, you can test my fix :) |
|
|
Way to get same issue Fixed both in https://github.com/LimeSurvey/LimeSurvey/pull/2430 |
|
|
Still don't understand why it's happen for you @hydroid7 :) Maybe a permission difference : |
|
|
What was the issue? Is still something to persue? |
|
|
https://bugs.limesurvey.org/view.php?id=18120#c69765 I don't really remind this part |
|
|
@gabrieljenik see For tester, before the fix :
And check after the fix ? |
|
|
Sorry, not following. |
|
|
Again : i can not reproduce the issue of hydroid7 , buit i have an issue with Can you check this one Code from one year ago, i don't really remind here. |
|
|
No worries. I smell something is wrong here as well. Still, I am noticing your error is slightly different than the reported error. Also, I am wondering if some of the imports done there could be don with dot notation. If you are OK:
What do you think? |
|
|
Or:
Or:
|
|
Lets' go :) |
|
Unsure ? |
|
|
Let's leave this on "feedback". As a way to leave it onthe record (in case PR is removed), this is the fix PR. |
|
|
:+1: |
|
|
feedback or |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2022-05-17 15:44 | hydroid7 | New Issue | |
| 2022-05-17 15:44 | hydroid7 | File Added: Screenshot 2022-05-17 at 15-40-24 500 Interner Serverfehler.png | |
| 2022-05-17 15:46 | hydroid7 | Note Added: 69741 | |
| 2022-05-17 15:46 | hydroid7 | Bug heat | 0 => 2 |
| 2022-05-17 15:46 | guest | Bug heat | 2 => 0 |
| 2022-05-17 15:46 | hydroid7 | Bug heat | 0 => 2 |
| 2022-05-17 15:52 | DenisChenu | Note Added: 69742 | |
| 2022-05-17 15:52 | DenisChenu | Bug heat | 2 => 4 |
| 2022-05-17 15:52 | DenisChenu | Note Added: 69743 | |
| 2022-05-17 15:53 | DenisChenu | Note Edited: 69742 | |
| 2022-05-17 15:58 | hydroid7 | Note Added: 69744 | |
| 2022-05-18 09:55 | DenisChenu | Note Added: 69762 | |
| 2022-05-18 09:55 | DenisChenu | File Added: Capture d’écran du 2022-05-18 09-54-53.png | |
| 2022-05-18 09:56 | DenisChenu | Note Added: 69763 | |
| 2022-05-18 09:56 | DenisChenu | File Added: CException.html | |
| 2022-05-18 10:18 | hydroid7 | Note Added: 69764 | |
| 2022-05-18 10:36 | DenisChenu | Note Added: 69765 | |
| 2022-05-18 14:43 | gabrieljenik | Assigned To | => DenisChenu |
| 2022-05-18 14:43 | gabrieljenik | Status | new => feedback |
| 2022-05-18 14:43 | gabrieljenik | Note Added: 69779 | |
| 2022-05-18 14:43 | gabrieljenik | Bug heat | 4 => 6 |
| 2022-05-18 14:44 | DenisChenu | Note Added: 69780 | |
| 2022-05-19 17:13 | DenisChenu | Note Added: 69861 | |
| 2022-05-19 22:01 | hydroid7 | Note Added: 69888 | |
| 2022-05-19 22:01 | hydroid7 | Status | feedback => assigned |
| 2022-05-19 22:02 | hydroid7 | Note Added: 69889 | |
| 2022-05-19 22:02 | hydroid7 | File Added: limesurvey_config.php | |
| 2022-05-19 22:14 | hydroid7 | Note Added: 69890 | |
| 2022-05-20 08:25 | DenisChenu | Note Added: 69892 | |
| 2022-05-20 09:22 | DenisChenu | Note Added: 69898 | |
| 2022-05-20 09:24 | DenisChenu | Steps to Reproduce Updated | |
| 2022-05-20 09:24 | DenisChenu | Status | assigned => ready for code review |
| 2022-05-20 09:29 | DenisChenu | Note Added: 69899 | |
| 2022-05-25 12:11 | DenisChenu | Issue Monitored: DenisChenu | |
| 2022-05-25 12:11 | DenisChenu | Bug heat | 6 => 8 |
| 2022-05-25 12:11 | DenisChenu | Assigned To | DenisChenu => |
| 2023-05-23 15:22 | gabrieljenik | Note Added: 75157 | |
| 2023-05-23 15:32 | DenisChenu | Note Added: 75160 | |
| 2023-05-23 15:33 | DenisChenu | Note Added: 75161 | |
| 2023-05-23 15:34 | DenisChenu | Note Edited: 75161 | |
| 2023-05-23 15:51 | gabrieljenik | Note Added: 75166 | |
| 2023-05-23 16:08 | DenisChenu | Note Added: 75171 | |
| 2023-05-23 16:48 | gabrieljenik | Note Added: 75180 | |
| 2023-05-23 16:51 | gabrieljenik | Note Added: 75181 | |
| 2023-05-23 16:53 | DenisChenu | Note Added: 75183 | |
| 2023-05-23 16:53 | DenisChenu | Note Added: 75184 | |
| 2023-05-23 16:58 | gabrieljenik | Note Added: 75185 | |
| 2023-05-23 17:06 | DenisChenu | Note Added: 75186 | |
| 2023-05-23 17:06 | DenisChenu | Assigned To | => DenisChenu |
| 2023-05-23 17:06 | DenisChenu | Status | ready for code review => feedback |
| 2023-05-23 17:06 | DenisChenu | Note Added: 75187 | |
| 2023-06-15 12:06 | DenisChenu | Assigned To | DenisChenu => |
| 2023-06-15 12:06 | DenisChenu | Status | feedback => closed |
| 2023-06-15 12:06 | DenisChenu | Resolution | open => unable to reproduce |