Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Role User does not work
#1
Recently installed: LetoDMS-3.0.0-RC5 and everything seems to be working OK except "role".

After installing, the User Role dropdown selector did not show "User" as an option, only a blank, Adminstrator and Guest. Both Administrator (can do everything) and Guest (read only) work fine.

In the file "LetoDMS_Core/Core/inc.ClassUser.php" the following are defined:

107 const role_user = '0';
108 const role_admin = '1';
109 const role_guest = '2';

242 function isAdmin()
244 function setAdmin($isAdmin)
255 function isGuest()
257 function setGuest($isGuest)

NO function isUser() NOR function setUser($isUser)

In the file "/Out/out.UsrMgr.php" the following line is supposed to show the items in the drop down list:

142 <td><select name="role"><option value="<?= LetoDMS_Core_User::role_user ?>"></option><option value="<?= LetoDMS_Core_User::role_admin ?>"><?php printMLText("role_admin"); ?></option><option value="<?= LetoDMS_Core_User::role_guest ?>"><?php printMLText("role_guest"); ?></option></select></td>

The following code snippet appears to be missing: <?php printMLText("role_user"); ?>

So I added it to the line, then I got the following error message in the drop down selection list:

Error getting Text: role_user (English)

In the file: "/languages/English/lang.inc" the following are defined:

326 $text["role_admin"] = "Administrator";
327 $text["role_guest"] = "Guest";

BUT NO role_user, so I added the following:

328 $text["role_user"] = "User";

NOW, if a ADD a new user, the selection "User" shows in the drop down list. However, if I attempt to edit an existing user the selection "User" does NOT show in the list, only the blank line again.

If I create a new user and select the role "User" the permissions are the same as for the role "Guest". So something is pooched.

Please advise. I need to have users who can read/write upload/download but without admin permissions.
Reply
#2
(10-24-2011, 12:35 AM)amwassil Wrote: Recently installed: LetoDMS-3.0.0-RC5 and everything seems to be working OK except "role".

You should try version 3.2.0

Uwe
Reply
#3
(10-24-2011, 01:12 PM)steinm Wrote:
(10-24-2011, 12:35 AM)amwassil Wrote: Recently installed: LetoDMS-3.0.0-RC5 and everything seems to be working OK except "role".

You should try version 3.2.0

Uwe

Thanks. I've installed version 3.2.0. By the way your installation and upgrade instructions need to be updated, they are almost useless for this version. Anyway, did a fresh install, edited conf/settings.xml, but when I attempt to install I get the following error:

http://path-to-dms/install/install.php

Fatal error: Call to a member function xpath() on a non-object in /inc/inc.ClassSettings.php on line 232

Here's the offending line:

232 $node = $xml->xpath('/configuration/site/display');

There is NO /configuration directory anywhere, so it's going to fail on these lines as well:

241 $node = $xml->xpath('/configuration/site/edition');
253 $node = $xml->xpath('/configuration/site/calendar');
260 $node = $xml->xpath('/configuration/system/server');
272 $node = $xml->xpath('/configuration/system/authentication');
281 $node = $xml->xpath('/configuration/system/authentication/connectors/connector');
316 $node = $xml->xpath('/configuration/system/database');
326 $node = $xml->xpath('/configuration/system/smtp');
... and a whole bunch more I won't bother to list here.

What happened, did something get left out of the 3.2.0 tarball? Please advise. thanks.
Reply
#4
(10-25-2011, 01:49 AM)amwassil Wrote:
(10-24-2011, 01:12 PM)steinm Wrote:
(10-24-2011, 12:35 AM)amwassil Wrote: Recently installed: LetoDMS-3.0.0-RC5 and everything seems to be working OK except "role".

You should try version 3.2.0

Uwe

Thanks. I've installed version 3.2.0. By the way your installation and upgrade instructions need to be updated, they are almost useless for this version. Anyway, did a fresh install, edited conf/settings.xml, but when I attempt to install I get the following error:

http://path-to-dms/install/install.php

Fatal error: Call to a member function xpath() on a non-object in /inc/inc.ClassSettings.php on line 232

Here's the offending line:

232 $node = $xml->xpath('/configuration/site/display');

There is NO /configuration directory anywhere, so it's going to fail on these lines as well:

I know the install instructions are in bad shape. In your case the configuration file was probably not found. The install.php script should have copied the template form install/settings.xml.template_install into conf/settings.xml.

Check if conf/settings.xml is at its place.

Uwe
Reply
#5
(10-25-2011, 08:16 PM)steinm Wrote:
(10-25-2011, 01:49 AM)amwassil Wrote:
(10-24-2011, 01:12 PM)steinm Wrote:
(10-24-2011, 12:35 AM)amwassil Wrote: Recently installed: LetoDMS-3.0.0-RC5 and everything seems to be working OK except "role".

You should try version 3.2.0

Uwe

Thanks. I've installed version 3.2.0. By the way your installation and upgrade instructions need to be updated, they are almost useless for this version. Anyway, did a fresh install, edited conf/settings.xml, but when I attempt to install I get the following error:

http://path-to-dms/install/install.php

Fatal error: Call to a member function xpath() on a non-object in /inc/inc.ClassSettings.php on line 232

Here's the offending line:

232 $node = $xml->xpath('/configuration/site/display');

There is NO /configuration directory anywhere, so it's going to fail on these lines as well:

I know the install instructions are in bad shape. In your case the configuration file was probably not found. The install.php script should have copied the template form install/settings.xml.template_install into conf/settings.xml.

Check if conf/settings.xml is at its place.

Uwe

Yes, there is a conf/settings.xml copied from conf/settings.xml.template and modified to match the settings in my previous conf.Settings.php.

I also tried renaming conf/settings.xml to conf/new_settings.xml and running .../install/install.php again to see if it would copy install/settings.xml.template_install into conf/settings.xml.

I get this error:
Configuration file not found
Please create conf/settings.xml file. You can use installation procedure or 'conf/settings.xml.template' file to help you

Where do I go from here? Thanks. This is really very frustrating. Version 3.0.0 worked fine, except for the "role" issue, which is supposedly fixed in 3.2.0 but refuses to install properly.
Reply
#6
(10-26-2011, 01:13 AM)amwassil Wrote: I also tried renaming conf/settings.xml to conf/new_settings.xml and running .../install/install.php again to see if it would copy install/settings.xml.template_install into conf/settings.xml.

I get this error:
Configuration file not found
Please create conf/settings.xml file. You can use installation procedure or 'conf/settings.xml.template' file to help you

Where do I go from here? Thanks. This is really very frustrating. Version 3.0.0 worked fine, except for the "role" issue, which is supposedly fixed in 3.2.0 but refuses to install properly.

Is conf/settings.xml readable by your web server? If you move away conf/settings.xml and restart the installation it should also work.

Uwe
Reply
#7
(10-26-2011, 01:34 PM)steinm Wrote:
(10-26-2011, 01:13 AM)amwassil Wrote: I also tried renaming conf/settings.xml to conf/new_settings.xml and running .../install/install.php again to see if it would copy install/settings.xml.template_install into conf/settings.xml.

I get this error:
Configuration file not found
Please create conf/settings.xml file. You can use installation procedure or 'conf/settings.xml.template' file to help you

Where do I go from here? Thanks. This is really very frustrating. Version 3.0.0 worked fine, except for the "role" issue, which is supposedly fixed in 3.2.0 but refuses to install properly.

Is conf/settings.xml readable by your web server? If you move away conf/settings.xml and restart the installation it should also work.

Uwe

> Is conf/settings.xml readable by your web server?

Yes, thanks. In an attempt to troubleshoot I started stepping through the install program to try to determine exactly where the problems start and it looks like this is the first place things don't go as they should:

Browser Error:
http://www..../install/install.php
inc/inc.Settings 1 OK
inc/inc.Settings 2 OK

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 232

The script fails here: inc/inc.Settings.php

049 echo 'inc/inc.Settings 1 OK</br>'; // added for debug
050 require_once('inc.ClassSettings.php');
051 echo 'inc/inc.Settings 2 OK</br>'; // added for debug
052 $settings = new Settings();
053 echo 'inc/inc.Settings 3 OK</br>'; // added for debug

So the script fails at: $settings = new Settings();

Hope this helps. Thanks.
Reply
#8
(10-27-2011, 12:26 AM)amwassil Wrote: Browser Error:
http://www..../install/install.php
inc/inc.Settings 1 OK
inc/inc.Settings 2 OK

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 232

The script fails here: inc/inc.Settings.php

049 echo 'inc/inc.Settings 1 OK</br>'; // added for debug
050 require_once('inc.ClassSettings.php');
051 echo 'inc/inc.Settings 2 OK</br>'; // added for debug
052 $settings = new Settings();
053 echo 'inc/inc.Settings 3 OK</br>'; // added for debug

So the script fails at: $settings = new Settings();

So it happens in the constructor of the class Settings(). The only reasonable cause for that is a failure in reading the configuration file.

Place some echos in the constructor of class Settings in inc/inc.ClassSettings.php.
You could for example echo the $configFilePath.

Uwe
Reply
#9
(10-27-2011, 04:11 PM)steinm Wrote:
(10-27-2011, 12:26 AM)amwassil Wrote: Browser Error:
http://www..../install/install.php
inc/inc.Settings 1 OK
inc/inc.Settings 2 OK

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 232

The script fails here: inc/inc.Settings.php

049 echo 'inc/inc.Settings 1 OK</br>'; // added for debug
050 require_once('inc.ClassSettings.php');
051 echo 'inc/inc.Settings 2 OK</br>'; // added for debug
052 $settings = new Settings();
053 echo 'inc/inc.Settings 3 OK</br>'; // added for debug

So the script fails at: $settings = new Settings();

So it happens in the constructor of the class Settings(). The only reasonable cause for that is a failure in reading the configuration file.

Place some echos in the constructor of class Settings in inc/inc.ClassSettings.php.
You could for example echo the $configFilePath.

Uwe

Thanks for being patient and staying with me on this. Here's what I've got for you today:

http://.../install/install.php

file: inc/inc.ClassSettings.php
151: $configFilePath= ../conf/settings.xml
229: $configFilePath=../conf/settings.xml
231: $xml= no value for $xml

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 233

023: echo 'file: inc/inc.ClassSettings.php<br />';
142: function Settings($configFilePath='') { /* {{{ */
151: echo '151: $configFilePath= ', $configFilePath, '<br />';
228: function load($configFilePath) { /* {{{ */
229: if(!empty($configFilePath)) {echo '229: $configFilePath=', $configFilePath, '<br />';}
230: $xml = simplexml_load_string(file_get_contents($configFilePath));
231: if(!empty($xml)) {echo '231: ', $xml, '<br />';} else echo '231: $xml= no value for $xml</br />';

The file is where it's supposed to be:
/conf
settings.xml 8.2KB xml document -rw-r--r--

So it looks to fail at: $xml = simplexml_load_string(file_get_contents($configFilePath));
Reply
#10
(10-28-2011, 12:36 AM)amwassil Wrote: http://.../install/install.php

file: inc/inc.ClassSettings.php
151: $configFilePath= ../conf/settings.xml
229: $configFilePath=../conf/settings.xml
231: $xml= no value for $xml

Fatal error: Call to a member function xpath() on a non-object in /.../inc/inc.ClassSettings.php on line 233

023: echo 'file: inc/inc.ClassSettings.php<br />';
142: function Settings($configFilePath='') { /* {{{ */
151: echo '151: $configFilePath= ', $configFilePath, '<br />';
228: function load($configFilePath) { /* {{{ */
229: if(!empty($configFilePath)) {echo '229: $configFilePath=', $configFilePath, '<br />';}
230: $xml = simplexml_load_string(file_get_contents($configFilePath));
231: if(!empty($xml)) {echo '231: ', $xml, '<br />';} else echo '231: $xml= no value for $xml</br />';

The file is where it's supposed to be:
/conf
settings.xml 8.2KB xml document -rw-r--r--

So it looks to fail at: $xml = simplexml_load_string(file_get_contents($configFilePath));

Does 'echo file_get_contents($configFilePath)' just before the line with simplexml_load_string() return the content of the config file? I still think that the problems lies in reading the config file.

Uwe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)