MyBB Community Forums

Full Version: Administrator adapting templates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi All,

If I adapt a template I try to keep the template intact as much as possible.
By 'commenting out' with <!--  --> I try do 'delete' things in templates.

Although in the beginning this was working very well, now I standardly get this error message.


Quote:Forbidden
You don't have permission to access /VBAForum/beheer/index.php?module=style-templates&action=edit_template&expand=33|2|13|12|29|23 on this server.

www.snb-vba.eu


Even templates I have adapted in the past adding <!-- & -->    I can't save anymore.

Does someone have a solution to this ?

Thanks
looks like mod_security is imposed by your web host.
check recent entries of server error log to find if mod_security is triggered

if you trace it then
contact your web host for disabling it / adding relevant white rules ..
Thank you.

No it is more serious than that.
It has to do with the translation of the variable

$l['admin_permissions'] = "Admin Permissions";

In inc/languages/dutch/admin/user_module_meta_lang.php

If you translate "Admin Permissions" in another language your permissions to save templates are vanished.

To me it seems a serious flaw.
It means $l['admin_permissions'] isn't a variable but should be a constant.
(2020-05-22, 09:54 PM)snb Wrote: [ -> ]Thank you.

No it is more serious than that.
It has to do with the translation of the variable

$l['admin_permissions'] = "Admin Permissions";

In inc/languages/dutch/admin/user_module_meta_lang.php

If you translate "Admin Permissions" in another language your permissions to save templates are vanished.

To me it seems a serious flaw.
It means $l['admin_permissions'] isn't a variable but should be a constant.

Sorry I don't quite understand you about the relationship between this language entry and style/template editing issue.

By the way, what's your translated phrase for $l['admin_permissions']?
The translation is: "beheerrechten".

If this translation is being used I get the error message "Access denied".
As soon as I leave this variable untranslated "Admin permissions" the error message doesn't appear and I can save the edited template.

This setting is being checked in:

\admin\modules\style\module_meta.php
(2020-05-23, 10:23 AM)snb Wrote: [ -> ]The translation is: "beheerrechten".

If this trnalation is being usde I get the error message "Access denied".
As soon as I leave this variabele untranslated "Admin permissions" the error message doesn't appear and I can save the edited template.

This setting is being checked in:

\admin\modules\style\module_meta.php

I think you have to follow @.m.'s tip: https://community.mybb.com/thread-227884...pid1349967 to change/disable mod_security on your host.

MyBB can't cater to all WAF rules IMO, especially some rules are so much aggressive. I think you should be able or get able to manage the rules used on your own web path.
@noyle,

As you can read in #3: https://community.mybb.com/thread-227884...pid1350156 the solution lies elsewhere than .m. suggested.
Please read #3 carefully again.
I don't need any more advice because I solved it myself and made it public in #3.

My suggestion is that this forum should warn translators not to translate

$l['admin_permissions'] = "Admin Permissions";

PS. Please do not quote whole posts unnecessarily.
I couldn't reproduce this issue.
Thank you,

Now my provider advises to change a template directly, using FTP.
Can you tell me where I can adapt the templates directly without using the ACP ?
^ template's content can be modified through database managing application - like phpMyAdmin
can be queried using sid & title - however it can be a tedious process
[hovering mouse pointer over the template link indicates those values at browser status bar]
Pages: 1 2