Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Jonas Erlandsson Posted December 22, 2021 Posted December 22, 2021 Hello. I've moved my installation from one server to another and if I copy the datastore and uploads from the old server to the new one everything works, but since the old site is our staging/test-installation the domain is different and things are loaded from that old domain on the live site (which gives me cors error). So what I did was that I tried to clear the system cache and when I do that all hell breaks lose. All CSS and JS are gone (e.g not reproduced in /uploads) and all I see is: InvalidArgumentException: (0) #0 /site/system/File/File.php(326): IPS\_Image::create() #1 /site/system/Theme/Theme.php(709): IPS\_File::create() #2 /site/system/Theme/Theme.php(4495) : eval()'d code(14): IPS\_Theme->resource() #3 /site/system/Theme/Theme.php(5348): IPS\Theme\css_core_global___flags_css() #4 /site/system/Theme/Theme.php(2543): IPS\_Theme::writeCss() #5 /site/system/Theme/Theme.php(621): IPS\_Theme->compileCss() #6 /site/system/Dispatcher/Standard.php(63): IPS\_Theme->css() #7 /site/system/Dispatcher/Admin.php(89): IPS\Dispatcher\_Standard::baseCss() #8 /site/system/Dispatcher/Dispatcher.php(110): IPS\Dispatcher\_Admin->init() #9 /site/admin/index.php(13): IPS\_Dispatcher::i() #10 {main} and it looks like this: any ideas on what might go wrong with this? My first thought was that uploads and datastore couldn't write, but when I look in there I can see that new files have been created. I seem to get 500 error (in network tab) when I try to go to /admin.
Marc Posted December 22, 2021 Posted December 22, 2021 That would indeed indicate an issue with writing some of the items. It sounds like its items in the uploads folder rather than in the datastore that you would be looking at
Jonas Erlandsson Posted December 22, 2021 Author Posted December 22, 2021 I do have a lot of template_<hash>-files in uploads (and some in the datastore folder as well). The uploads folder also contains css_build_0 and whatnot. So the directories are writable. Trying to turn on debug logging now to see if I can get a more detailed error. The uploads/logs doesn't give me any kind of error strangely enough.
Jonas Erlandsson Posted December 22, 2021 Author Posted December 22, 2021 Is there any way that I from CLI can rebuild the things that the system cache deletes?
Marc Posted December 22, 2021 Posted December 22, 2021 No, the only way to do that would be to click clear cache in the admin CP
Jonas Erlandsson Posted December 22, 2021 Author Posted December 22, 2021 (edited) It does say this: Quote [[Template core/admin/global/globalTemplate is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] What does the "support tool" refer to here and is it triggerable via REST? I looked up the clearCache controller and that doesn't seem to regenerate the files again after being run (but maybe that's done when the site is loaded for the first time?). I even tried to change it so that the cache would be stored in the DB but that had no effect at all. I edited index.php and tried to write to /uploads when I loaded the page and that worked so the application can write to the uploads folder. Any ideas @Marc Stridgen? Edited December 22, 2021 by Jonas Erlandsson
Marc Posted December 22, 2021 Posted December 22, 2021 The support tools are those under support in the admin CP. You cannot run any of these items via rest or cli. There are 2 things which will rebuild items. Clearing cache in the support area, or disabling and reenabling an application
Jonas Erlandsson Posted January 4, 2022 Author Posted January 4, 2022 (edited) We've figured part of this out now. The system cache still breaks stuff but at least it won't kill the theme anymore. However - it does not recreate the upload-folders that keeps my images for my CMS content so I had to manually re-create that again. I can re-upload the files. I had a monthly_2021_12 folder containing content and when I run the clear system cache that got removed and not re-created. Can you point me in the direction where the system cache gets recreated after clearing so that I can debug it? Now it acts as a "remove all uploaded content" to me rather than a cache clearing mechanism. Edited January 4, 2022 by Jonas Erlandsson Markup looked weird. Hopefully reformatted.
Marc Posted January 4, 2022 Posted January 4, 2022 That would indicate it cannot write to the uploads folder. Have you made sure uploads and all subfolders are writable?
Jonas Erlandsson Posted January 5, 2022 Author Posted January 5, 2022 The system has created them and I can upload files in the system. The system can create files so it should be able to create folders (e.g uploads is writable by the system). It still won't recreate. That's why I want to debug why things aren't recreated. As I mentioned earlier in the thread I changed the index.php file so that it would create things in the uploads folder when I load the page and that worked so files can definitely be created. We've even had 777 permissions on the uploads folder but it still won't recreate it. Can you point me to where things are being recreated so that I know where to start debug without having to trace it manually please? I'd be happy to share my findings here so it'd be a win win for everyone.
Marc Posted January 5, 2022 Posted January 5, 2022 Please could you update all access details on file, and I can then take a look to see whats going on
Jonas Erlandsson Posted January 7, 2022 Author Posted January 7, 2022 (edited) The information is updated. Unfortunately I can only give you access to the ACP. And please do _not_ press the clear cache button as that's our production (it might speak for itself at this stage but better safe than sorry 😝) Edited January 7, 2022 by Jonas Erlandsson
Marc Posted January 7, 2022 Posted January 7, 2022 1 hour ago, Jonas Erlandsson said: The information is updated. Unfortunately I can only give you access to the ACP. We would need full access in order to be able to investigate what is going on there. So either ftp or sftp would need to be present
Jonas Erlandsson Posted January 7, 2022 Author Posted January 7, 2022 Ok, I'll see if our devops team can sort it out. I'll get back to you when I've got an answer. SeNioR- and Marc 2
Jonas Erlandsson Posted January 10, 2022 Author Posted January 10, 2022 Now everyone is back from the winter holidays and I've talked to the head of operations. We would need a time slot for when you would log in and a list of IPs that should have access. Is that doable?
Marc Posted January 10, 2022 Posted January 10, 2022 We can give a list of IPs (I will pm them shortly), however we cannot give specific times on when we would look at the issue unfortunately Jonas Erlandsson 1
Recommended Posts