pages generated dynamically are not visible until admin area is accessed - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: pages generated dynamically are not visible until admin area is accessed (/showthread.php?tid=5698) |
pages generated dynamically are not visible until admin area is accessed - mlerman - 2014-02-28 I generate pages with xml files. However when the new page is generated it is not visible in the front end. If I login into admin the page becomes just fine. This behavior started since I've upgraded to the latest version on my website manestate.com Anybody can help explain this? and how to fix this? I create new pages when a user register on the website. RE: pages generated dynamically are not visible until admin area is accessed - Carlos - 2014-02-28 You should delete data/other/pages.xml after creating a page, so that the index/cache file is refreshed. RE: pages generated dynamically are not visible until admin area is accessed - shawn_a - 2014-02-28 We no longer constantly update the cache against files, since file editing is not a supported way of editing files and is a performance issue. This was actually a bug that was fixed. If you want, you could use my component hook plugin or write a actual plugin to force the cache to regen on front end. You have to refresh the pages.php if you are manually editing pages. This might be a problem if you have i18n installed also, since it replaces pages. Actually this might not even work either, since it only updates if the file count changes. see https://github.com/GetSimpleCMS/GetSimpleCMS/issues/560 Do you need help with this ? I would actually do this in a component that is called on a special page via template or dynpages component, you can refresh this page when you need on the front end. Or use a hook and do an ip check, or usr cookie, query string check or whatever. for starters PHP Code: create_pagesxml(true) RE: pages generated dynamically are not visible until admin area is accessed - shawn_a - 2014-02-28 nevermind i just reread your post, if you just want to detect new pages. you can do PHP Code: getPagesXmlValues(true); And it will still do a file check but it wont have to reload all pages unless the count changed. A dir scan is still wasteful on every hit, so i would add some custom cookie detection or something so only you trigger it, or use a custom template page as i mentioned before, or if you are using some ftp process, just delete the page cache like carlos says. RE: pages generated dynamically are not visible until admin area is accessed - shawn_a - 2014-02-28 actually this is a two-parter, particular issue looks like is from a security fix to prevent browsing files not in pagecache such as uploaded pages or dir traversal attempts on slugs and prevent doing file exist checks for every bad request. RE: pages generated dynamically are not visible until admin area is accessed - mlerman - 2014-03-02 Thank you. The easiest for me is just to delete the cache file pages.xml. That is good enough. |