The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
All pages removed from database - 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: All pages removed from database (/showthread.php?tid=737)



All pages removed from database - c.l.f.wittmann@gmail.com - 09-12-2017

Every time I open the page admin_pages.php all pages in the userspice database are getting removed. What might be the reason for this?


All pages removed from database - Brandin - 09-12-2017

Your files must not be in the place they are expected to be...every time you open admin_pages.php it removes pages that no longer exist, and adds pages that do exist, within the directories defined in z_us_root.


All pages removed from database - c.l.f.wittmann@gmail.com - 09-12-2017

My pages were in the correct place, but I got an error in this methode in us_helpers.php

function getPathPhpFiles($absRoot,$urlRoot,$fullPath) {
$directory = $absRoot.$urlRoot.$fullPath;
//bold ($directory);
$pages = glob($directory . "*.php");

foreach ($pages as $page){
$fixed = str_replace($absRoot.$urlRoot,'',$page);
$row[$fixed] = $fixed;
}
return $row;
}

I had to add an $row = array(); and that solved it.

function getPathPhpFiles($absRoot,$urlRoot,$fullPath) {
$directory = $absRoot.$urlRoot.$fullPath;
//bold ($directory);
$pages = glob($directory . "*.php");

$row = array();
foreach ($pages as $page){
$fixed = str_replace($absRoot.$urlRoot,'',$page);
$row[$fixed] = $fixed;
}
return $row;
}

Thank you nevertheless.


All pages removed from database - Brandin - 09-13-2017

Can you paste your z_us_root?