The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
US4.1.5 - Table 'Pages' emptied by users/admin_pages.php - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: US4.1.5 - Table 'Pages' emptied by users/admin_pages.php (/showthread.php?tid=277)

Pages: 1 2


US4.1.5 - Table 'Pages' emptied by users/admin_pages.php - brian - 09-22-2016

That is something I have been thinking about, to introduce some kind of safeguard in case of an accident. Another idea would be to implement a baseline configuration that sets default page permissions that are more difficult to change or that you must add or remove manually, rather than in the fully automated approach currently implemented.


US4.1.5 - Table 'Pages' emptied by users/admin_pages.php - mudmin - 09-22-2016

Yep. I think I'm actually going to roll that into 4.2 before final release.

It's a TON better than it was. It used to just flash up something about line 365 in a php error. Let me see what I can do on that.


US4.1.5 - Table 'Pages' emptied by users/admin_pages.php - mudmin - 09-23-2016

@yolo, Try replacing your us_helpers.php file with this one

http://pastebin.com/J4wnSXfz

And see if it acts like you're thinking it should. In that case, if you don't have a page in the db, it will add it instead of tossing an error. If it can't add it, THEN it will toss the error. There could be bugs, but it's worth a shot. If it doesn't work, you can just replace it with the original.


US4.1.5 - Table 'Pages' emptied by users/admin_pages.php - yolo - 09-26-2016

Hello mudin,

I did some tests.

1/ With right installation/configuration => All fine

2/ With MariaDB stopped : Message « SQLSTATE[HY000] [2002] No such file or directory » when accessing to the website.

3/ With DB dropped : Message « SQLSTATE[HY000] [1049] Unknown database 'userSpiceDB' » when accessing to the website.

4/ With 'users' table dropped :
when validating the user/password in login.php :

Fatal error: Call to a member function count() on boolean in /var/www/html/mlm09/users/classes/us_classes.php on line 407
PHP 1. {main}() /var/www/html/mlm09/users/login.php:0
PHP 2. User->loginEmail() /var/www/html/mlm09/users/login.php:101
PHP 3. User->find() /var/www/html/mlm09/users/classes/us_classes.php:452

5/ With 'pages' table dropped :
When accessing to the website or logged:

PHP Notice: Undefined property: stdClass::$page in /var/www/html/mlm09/users/helpers/us_helpers.php on line 436
PHP 1. {main}() /var/www/html/mlm09/index.php:0
PHP 2. require_once() /var/www/html/mlm09/index.php:45
PHP 3. securePage() /var/www/html/mlm09/menu.inc.php:5

PHP Notice: Undefined property: stdClass::$private in
/var/www/html/mlm09/users/helpers/us_helpers.php on line 436
PHP 1. {main}() /var/www/html/mlm09/index.php:0
PHP 2. require_once() /var/www/html/mlm09/index.php:45
PHP 3. securePage() /var/www/html/mlm09/menu.inc.php:5

=> Nota : Possible to open public and private pages without logging (login.php isn't requested).

6/ With misconfiguration in z_us_root.php ($path=['mlm09','mlm09/users/','mlm09/usersc/']Wink
Logged in admin and opening users/admin_pages.php

PHP Notice: Undefined variable: row in /var/www/html/mlm09/users/helpers/us_helpers.php on line 166
PHP 1. {main}() /var/www/html/mlm09/users/admin_pages.php:0
PHP 2. getPathPhpFiles() /var/www/html/mlm09/users/admin_pages.php:52

PHP Warning: Invalid argument supplied for foreach() in /var/www/html/mlm09/users/admin_pages.php on line 53
PHP 1. {main}() /var/www/html/mlm09/users/admin_pages.php:0

=> Nota : No specific message. The page doesn't display the list of files due to misconfiguration of z_us_root.php. The 'pages' table has been emptied.


I don't know if it runs as expected. For the last case, should I see a specific message ?
Thank you.