The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
I broke my 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: I broke my pages (/showthread.php?tid=1312) |
I broke my pages - astropos - 01-22-2019 Hi, 4.3.26 on Ubuntu/Apache2 Just wanted to check something (I'm spinning up another instance to test further while I type): I attempted to run a test system and live system off the same db - it seemed to work OK while I worked on it. The latest feature initially required an AJAX GET (just to bring in a list of comments). Whilst working on the subsequent AJAX POST, I noticed that the files called by AJAX were not being added to the pages table. Moreover, there were many entries in pages_permissions for pages that did not exist. The pages called by AJAX have a successful call to init and a call to a DB instance, and return data correctly. If I access these pages directly in my browser, I am prompted to secure them - but the pages table is not updated. Is this a result of the live/test 'stunt' or is it anything to do with calling by AJAX? cheers RE: I broke my pages - mudmin - 01-22-2019 There are 2 things you can do with ajax parser files. I tend not to like to clog up my pages table with parser files, so I tend to not use the securePage function and instead do something like... require_once("../../users/init.php"); /obviously with your own path $db = DB::getInstance(); if(!hasPerm([2,3],$user->data()->id)){ die("Not logged in"); } If you really want the parsers files to use securePage, then you have to add the folder that they're stored in to the z_us_root file. RE: I broke my pages - astropos - 01-22-2019 perfect, thankyou Mudmin. I should have figured out that old school method myself I'll be asking about Validation next, once I've built this new server... thanks again, |