XF 2.2 Problems with admin templates / addon selector

apathy

Well-known member
Ever since 2.2.5 I'm having issues where the "Admin" tab in templates, and also the "Addon" dropdown at the bottom of a template, do not appear.

In my 2.2.4 dev box it works totally normally. However, on my actual forum, starting from 2.2.5 and continuing with 2.2.6 I'm experiencing this behavior.

So this is how the Templates page looks on 2.2.5/2.2.6:
6jCVvlN.png


That is, until I add &type=admin to the end of the URL. Then it looks like this:
Aj7Fc52.png


And when I swap back to the "Public" tab:
pyvAnbp.png


However, then I go into another themes templates, and it resets:
EbLnWkR.png


And this is what the "Addon" dropdown within a template looks like before the &type=admin workaround:
CFdnqbR.png


and after the workaround:
qqtVueb.png
 
I'm not entirely sure what is causing this but the behaviour as described is unexpected and I cannot reproduce it on my installations.

The admin templates and add-on selector are only available if development mode is enabled. This is typically enabled in src/config.php and there shouldn't be any intermittency - it would either be enabled or not.

Do you have an add-on that allows you to toggle development mode through the admin control panel? If so, I'd start there as it may have an issue.
 
I'm not entirely sure what is causing this but the behaviour as described is unexpected and I cannot reproduce it on my installations.

The admin templates and add-on selector are only available if development mode is enabled. This is typically enabled in src/config.php and there shouldn't be any intermittency - it would either be enabled or not.

Do you have an add-on that allows you to toggle development mode through the admin control panel? If so, I'd start there as it may have an issue.
I have Dev mode on so they should be appearing - however, this is probably is an isolated issue in that case. I made the thread because one of my addons customers did not have the Admin tab appearing for him, however I did not know they only appeared with Dev mode! It seemed like something that was affecting small numbers of people.

I do not have any addons that interact with Dev mode, but I do have a lot of addons so it's possible one of them is causing it to crap out for some reason. I'll try disable them one by one and report back.
 
Unfortunately, even after disabling all my addons one-by-one, and having them all disabled at the same time, the "Admin" tab still does not appear for me.
I even tried disabling all my custom template modifications which were not assigned to addons, and this didn't solve the issue either.
 
Are you sure development mode is enabled? Is it enabled for a specific IP address?
It's deffo enabled, and only for my IP. Here's my config.php with the DB stuff taken out:

Code:
$config['fullUnicode'] = true;

$config['enableAddOnArchiveInstaller'] = true;

// Add your IP here
$debug_ips = array('MY_IP_ADDRESS');

// For multiple IPs use this format above
//$debug_ips = array('xxx.xx.x.xxx','yyy.yy.y.yyy');

// Fetching IP's
if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
} else {
    $ip_address = $_SERVER['REMOTE_ADDR'];
}

// Enable debug if IP matches
if(in_array($ip_address, $debug_ips))
    $config['development']['enabled'] = true;
 
From what you’ve described so far I wonder if your IP address is coming through as you expect.

You do have checks in there for proxied IP addresses it may be that your real address still isn’t coming through.

The fact that you seemed to be seeing it sometimes but not others is consistent with your IP address changing and not being detected as you expect.
 
I've temporarily update config.php to remove all the IP checking stuff and simply look like this:

Code:
$config['fullUnicode'] = true;

$config['enableAddOnArchiveInstaller'] = true;


$config['development']['enabled'] = true;

And still no dice :C
 
The other thing is that you can only modify templates in the master style. Templates only exist in the master style and no concept of styles exists for admin templates.
 
Top Bottom