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
Adding Pages - 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: Adding Pages (/showthread.php?tid=838)

Pages: 1 2


Adding Pages - matt - 11-19-2017

Hi - I have recently upgraded to the latest version of userspice but now I cant see the pages I have already created in the admin system.

<?php //DO NOT DELETE THIS FILE.
$path=['','users/','usersc/'];


//Only add or remove values in the $path variable separated by commas above

$abs_us_root=$_SERVER['DOCUMENT_ROOT'];

$self_path=explode("/", $_SERVER['PHP_SELF']);
$self_path_length=count($self_path);
$file_found=FALSE;

for($i = 1; $i < $self_path_length; $i++){
array_splice($self_path, $self_path_length-$i, $i);
$us_url_root=implode("/",$self_path)."/";

if (file_exists($abs_us_root.$us_url_root.'z_us_root.php')){
$file_found=TRUE;
break;
}else{
$file_found=FALSE;
}
}
//redirect back to Userspice URL root (usually /)
header('Location: '.$us_url_root);
exit;

?>


Adding Pages - mudmin - 11-19-2017

Hmm. I'm not sure that I'm following you.

If you copied and pasted that file from online, there is a chance that the quotes are messed up. The curly quotes cause problems.

This is the proper z_us_root
https://pastebin.com/kgxfsKVa

If you are wanting to add additional folders to monitor, you should do it like this...

Code:
$path=['','users/','usersc/','myotherfolder/'];



Adding Pages - matt - 11-20-2017

When I login to admin it doesnt recognise any pages but I know they are there in the user folder?

Regards

Matt


Adding Pages - Brandin - 11-20-2017

Is there any errors on the admin_pages file?


Adding Pages - matt - 11-20-2017

No errors which has confused me? Shall I email you my login details?


Adding Pages - Brandin - 11-20-2017

Did you do what mudmin suggested above? Changing the backticks to '?


Adding Pages - matt - 11-20-2017

Hi - now it errors saying too many redirects?


Adding Pages - Brandin - 11-20-2017

This would be as users/admin_pages.php got removed from the DB I'm imagining. Manually add this to the DB and add a corresponding pages_permission matches


Adding Pages - matt - 11-20-2017

Ok got that back working and can now see that page in Manage Page Access section.

When you click on the page to set the permissions it isn't finding the details?


Adding Pages - Brandin - 11-20-2017

Do you have existing data/modifications to your US? If you don't, I suggest a fresh install...otherwise, we'll have to dig deeper into this. Did you make any modifications to us_helpers? And can you also paste your z_us_root?