Invision Community 5: A video walkthrough creating a custom theme and homepage By Matt Thursday at 04:02 PM
TDBF Posted June 30 Posted June 30 (edited) I have three difference issues with designer mode and themes, and I am not sure if they are all related or not. 1. When enabling Designer's Mode, I get the following error: It seems that there is an issue with writing certain files (not all of them), and it happens every time with the exact same template files. As you can see from this image, the file is written as 0 bytes, but the content is not. If I hit the back button on the browser, the create.phtml file will be written to correctly, but there will be another error afterwards with another file. As I stated earlier, the errors are on the same template files each time, but as you can see, other template files are written without issue. I did some of my own test writing data to the disk and did not have any issues. No read write, or owner permission issues. I also get this message when installing applications. 2. In other cases, after running Designer's Mode, will get the message that Designers' mode is enabled, but in fact, it is not. This seems to be random when it will work and when it does not. But I have noticed that if there is only one theme installed or the default theme is set as the default, then Designer Mode will not stay enabled, regardless if the following message states that it is. 3. It seems that I have a lot of remnant templates in the core_theme_template table which cannot be removed. These templates now belong to template_set_id 0, and while they are user added, and there is no way to delete these from the template sets in the ACP as they are regarded as core entries. The problem is that each time I add a new theme, all of these remnant templates entries get added to the theme set. I want to know if it is okay to just delete these entries from the database template table or is there another way I can do this more safely?  Edited June 30 by TDBF
Marc Posted July 1 Posted July 1 Checking your server error logs would be your best bet. I suspect its very highly likely something is actually blocking them because of the content, so if you have things running like mod_sec, securi or similar, I would check the logs of those too.
TDBF Posted July 1 Author Posted July 1 4 hours ago, Marc Stridgen said: Checking your server error logs would be your best bet. I suspect its very highly likely something is actually blocking them because of the content, so if you have things running like mod_sec, securi or similar, I would check the logs of those too. It seems that Imunify is flagging /system/Theme/Advanced/Theme.php as 'black hash triggering' when saving contents using file_put_contents. Looks like this is a false positive, as the templates that are being flagged are core and have not modified, but it could also be the theme.php script which triggering this error? I have put the rule on ignore and this seems to have fixed all the issues I was getting. As I said, they all seemed related, and Imunify happened to be the last logs I checked today.
TDBF Posted July 1 Author Posted July 1 7 minutes ago, Marc Stridgen said: Glad to hear you found the issue 🙂 Me too, and thanks for the assist. However, in the process of trying to fix this, I have found a bug which relates to number 3 in my list. I'm just going through the process of trying to replicate this issue before posting the issue. Marc 1
Recommended Posts