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
Can't add folder and contents to 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: Can't add folder and contents to database (/showthread.php?tid=464)



Can't add folder and contents to database - gathr - 02-19-2017

I am trying to add a subfolder in users called downloads, which contains two files. I've altered line 2 of the z_us_root.php file to show the following:

$path=['','users/','usersc/','/users/downloads/'];

This actually does result in the pages showing up in the page manager, but altering permissions seems to not have any effect. The page still continues to present the message:

"You must go into the Admin Panel and click the Manage Pages button to add this page to the database. Doing so will make this error go away."

Any ideas on how to fix?


Can't add folder and contents to database - dan - 02-19-2017

In the upper right corner click the gear then go to admin dashboard.

There are 4 panels on the top. Click the third one. Opening it will call all those pages into the database so you can set the permissions for them. Even if you don't set the permissions, the error will go away.


Can't add folder and contents to database - gathr - 02-19-2017

Yeah that's the weird part. I've already been into that page and can see that the filepaths are being recognised, but when I try to access I get the error "You must go into the Admin Panel and click the Manage Pages..."


Can't add folder and contents to database - mudmin - 02-19-2017

Oh, I took another look and you are missing your final " in the array.


Can't add folder and contents to database - gathr - 02-19-2017

Yeah I am, Thanks!


Can't add folder and contents to database - gathr - 02-19-2017

Now I realise I grabbed that line from here:

https://userspice.com/monitoring-additional-folders/

Also all of a sudden I am locked out of anything in the users folder. Can't work out what's causing that. I've tried a number of combinations for line 2 but can't get past the prompt.

http://pastebin.com/KvDFCq5R


Can't add folder and contents to database - mudmin - 02-19-2017

Ok, so I came across something I've never noticed before. You can do mydomain.com/downloads but not mydomain.com/users/downloads (without writing an additional function. I'll have to work on that.

In the mean time, if you want mydomain.com/downloads to be monitored, just change line 2 of your z_us_root to
Code:
$path=['downloads/','','users/','usersc/'];

I'll work on a fix


Can't add folder and contents to database - mudmin - 02-19-2017

Actually, I take that back. Your problem was that you had a slash before users. It should be
$path=['users/downloads/','','users/','usersc/'];

Let me know if that works.


Can't add folder and contents to database - gathr - 02-19-2017

Not sure how this happened, but when I went to look at the mysql pages table, there were only three entries in there, adding pages manually seems to bring them back.