Advertisement:

Author Topic: Unable to load the main template  (Read 78235 times)

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Unable to load the main template
« on: February 08, 2007, 08:06:45 AM »
I have a custom template on my website.

I am not sure when this started, but if i try to make changes to the configuration (via the bridged forum) i get:

"Unable to load the main template".

This does NOT occur when i make changes directly from SMF (using the same custom theme, or any other theme).

I searched the forum for this error and applied whatever fix was suggested.
« Last Edit: February 08, 2007, 09:50:22 PM by Orstio »

Offline ottoman1990

  • Jr. Member
  • **
  • Posts: 122
  • Gender: Male
  • | 11 FB-B dadası |
Re: Unable to load the main template
« Reply #1 on: February 08, 2007, 08:10:14 AM »
You might change the default template name. Control that if the name is the same the template you use.
smf öğreniyor | learning smf
link: www.cbaalmekan.com
link: www.pansiyon17.com

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #2 on: February 08, 2007, 08:17:47 AM »
My custom template and the default template have a different name

Offline ottoman1990

  • Jr. Member
  • **
  • Posts: 122
  • Gender: Male
  • | 11 FB-B dadası |
Re: Unable to load the main template
« Reply #3 on: February 08, 2007, 08:23:27 AM »
The names have to be same.
smf öğreniyor | learning smf
link: www.cbaalmekan.com
link: www.pansiyon17.com

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #4 on: February 08, 2007, 08:26:20 AM »
oh :)

I just renamed the default theme with the same name as my custom theme, but nothing changed, i am still getting the error.

 

Offline ottoman1990

  • Jr. Member
  • **
  • Posts: 122
  • Gender: Male
  • | 11 FB-B dadası |
Re: Unable to load the main template
« Reply #5 on: February 08, 2007, 08:29:22 AM »
Can you give me the link?
And did you fix Theme url, Theme images url?
smf öğreniyor | learning smf
link: www.cbaalmekan.com
link: www.pansiyon17.com

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #6 on: February 08, 2007, 08:29:39 AM »
i doubt it that this is an SMF or a template issue.

I just switched to the default 1.1.1 theme via the bridged from, and i am still getting the error.
But if i access the forum directly, i have no problem even with my custom template.

I think this started since i upgraded to Bridge 1.1.7, but i am not sure...

Orstio will save the day

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,158
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unable to load the main template
« Reply #7 on: February 08, 2007, 08:36:55 AM »
ottoman,  please don't help like that... you are wrong, and renaming the DEFAULT template to match an existing template can mess things up...

every theme should have a different name.

Al0000, please give us a URL to look at this.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline ottoman1990

  • Jr. Member
  • **
  • Posts: 122
  • Gender: Male
  • | 11 FB-B dadası |
Re: Unable to load the main template
« Reply #8 on: February 08, 2007, 08:39:11 AM »
ottoman,  please don't help like that... you are wrong, and renaming the DEFAULT template to match an existing template can mess things up...

every theme should have a different name.

Al0000, please give us a URL to look at this.

No I mean that:
The default theme name and the theme folder name al0000 uses must be the same. This is the solving.
smf öğreniyor | learning smf
link: www.cbaalmekan.com
link: www.pansiyon17.com

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,158
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unable to load the main template
« Reply #9 on: February 08, 2007, 08:42:53 AM »
***NO***

You should NEVER rename the default theme folder!  You should **NEVER** rename the default theme folder to be the name of your custom theme!!!

Ottoman,
this appears to be somehow related to his bridging. Please do not throw random answers out, especially since he has already disproven your point by indicating the his site works fine when directly accessed and onyl bumps when accessed through the bridge.
« Last Edit: February 08, 2007, 08:44:30 AM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #10 on: February 08, 2007, 08:45:10 AM »
Indeed, this messed up my forum.

Offline ottoman1990

  • Jr. Member
  • **
  • Posts: 122
  • Gender: Male
  • | 11 FB-B dadası |
Re: Unable to load the main template
« Reply #11 on: February 08, 2007, 08:45:31 AM »
I am realy sorry. I have written DEFAULT THEME but I want to mean CUSTOM THEME. (I can not explain my thougts. Sorry...)
smf öğreniyor | learning smf
link: www.cbaalmekan.com
link: www.pansiyon17.com

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #12 on: February 08, 2007, 08:47:49 AM »
I temporarily closed my website since things got messed up.

How do i fix this now? :)
Where are the theme's settings located?

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #13 on: February 08, 2007, 08:51:18 AM »
All the administration links have disappeared, that's why i need to know where each theme's settings are located.

Settings.template.php does not include theme name or location/URL

thanx

Offline ottoman1990

  • Jr. Member
  • **
  • Posts: 122
  • Gender: Male
  • | 11 FB-B dadası |
Re: Unable to load the main template
« Reply #14 on: February 08, 2007, 08:55:29 AM »
MYSQL includes them.
smf öğreniyor | learning smf
link: www.cbaalmekan.com
link: www.pansiyon17.com

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #15 on: February 08, 2007, 09:15:28 AM »
I have fixed my templates.

Kindred, i have included my URL to a PM. I cannot give out the URL to the public.
Thanx

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,158
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unable to load the main template
« Reply #16 on: February 08, 2007, 09:21:40 AM »
understood.

You have fixed your template...   do you still have a problem?   If so, you can discuss any specific remaining issues with me in PM...

BTW: I notice that your sticky icon is missing in the theme you have selected....
« Last Edit: February 08, 2007, 09:23:24 AM by Kindred »
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #17 on: February 08, 2007, 06:29:02 PM »
Unfortunately i didn't catch Kindred online.
If anyone else is willing to help me, please say so.

There are currently three issues that i can't resolve:

1. I get "Unable to load the main template" when i try to make a change in the configuration
2. Polls are not seen for some reason. You CAN open a open, the post will be seen, but it will not include a poll.
3. Moderator reports do not include the user's message

Orstio

  • Guest
Re: Unable to load the main template
« Reply #18 on: February 08, 2007, 06:37:05 PM »
Quote
1. I get "Unable to load the main template" when i try to make a change in the configuration

Can you copy the URL from this error, and paste it here?  (Edit out the actual URL if you wish, I just need to see the query string).

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #19 on: February 08, 2007, 06:56:09 PM »
Sure,

That is:

component/option,com_smf/Itemid,168/action,featuresettings2/save/sa,basic

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #20 on: February 08, 2007, 07:16:47 PM »
My custom theme is based on the "classic" theme.

maybe this has sth to do with it?

Just trying to help :)

thanx

Orstio

  • Guest
Re: Unable to load the main template
« Reply #21 on: February 08, 2007, 07:25:30 PM »
Quote
action,featuresettings2

Right there is your problem.  Joomla is dropping the query string after the Itemid to lower case.

Is this Joomla from joomla.org, or from a third party language-specific site?

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #22 on: February 08, 2007, 07:26:50 PM »
my joomla is from official from joomla.org

.htaccess is the one i found here on this forum, which works with SMF

Orstio

  • Guest
Re: Unable to load the main template
« Reply #23 on: February 08, 2007, 07:57:20 PM »
And you have no third-party SEF component installed?

If you look in your includes folder, there is a file named sef.php.  Can you paste here any lines with "strtolower" in them?

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #24 on: February 08, 2007, 08:01:32 PM »
And you have no third-party SEF component installed?

If you look in your includes folder, there is a file named sef.php.  Can you paste here any lines with "strtolower" in them?

Nope, no third-party SEF installed.

Sure:

if ($dir !== '.' && $dir !== '..' && is_dir($path .'/'. $dir) && strtolower($dir) !== 'cvs' && strtolower($dir) !== '.svn') {


if( (!empty( $_SERVER['HTTPS'] ) && strtolower( $_SERVER['HTTPS'] ) != 'off' || isset( $http_host[1] ) && $http_host[1] == 443) && substr( $mosConfig_live_site, 0, 8 ) != 'https://' ) {

 

Orstio

  • Guest
Re: Unable to load the main template
« Reply #25 on: February 08, 2007, 08:11:50 PM »
Hmmm....

Somewhere, the query string is being dropped to lower case.

So, the easiest fix is to change it in SMF's index.php:

Code: [Select]
'featuresettings2' => array('ModSettings.php', 'ModifyFeatureSettings2'),

make sure that "featuresettings2" is all lower case.

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #26 on: February 08, 2007, 08:14:39 PM »
hmm...that's how the line is already, i didn't change it, here it is:


Code: [Select]
'featuresettings2' => array('ModSettings.php', 'ModifyFeatureSettings2'),
 
« Last Edit: February 08, 2007, 08:17:35 PM by al0000 »

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #27 on: February 08, 2007, 08:25:58 PM »
Also, this does not happen only when editing admin options.

It happens on other locations, for instance on the VisualWarning mod.

I must find out where the code is changed to lower case. (and why only to me?)

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #28 on: February 08, 2007, 08:49:17 PM »
Also, this does not happen only when editing admin options.

It happens on other locations, for instance on the VisualWarning mod.

I must find out where the code is changed to lower case. (and why only to me?)

Sorry my mistake.

Visualwarning seems to work just fine

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #29 on: February 08, 2007, 08:51:12 PM »
Orstio,

I think found the problem

I have two mods installed:

Custom Profile Fields
Visual Warning Mod

Both of them have edited the SMF's featuresettings file. I know becase i see their options there.

Orstio

  • Guest
Re: Unable to load the main template
« Reply #30 on: February 08, 2007, 09:11:22 PM »
OK, is this in your bridge smf.php, on line 230:

Code: [Select]
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #31 on: February 08, 2007, 09:14:10 PM »
Yes....this is a copy/paste from my smf.php

Code: [Select]
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));

Orstio

  • Guest
Re: Unable to load the main template
« Reply #32 on: February 08, 2007, 09:25:59 PM »
What happens if you change it to this?

Code: [Select]
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([\;#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #33 on: February 08, 2007, 09:28:18 PM »
What happens if you change it to this?

The problem gets fixed :D

Orstio

  • Guest
Re: Unable to load the main template
« Reply #34 on: February 08, 2007, 09:29:34 PM »
Yeah, I was wondering if it might break something else?

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #35 on: February 08, 2007, 09:30:04 PM »
Thanx!  :)

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #36 on: February 08, 2007, 09:30:17 PM »
Hm, let me check

Offline sektor

  • Jr. Member
  • **
  • Posts: 341
Re: Unable to load the main template
« Reply #37 on: February 08, 2007, 09:47:41 PM »
Everything seems to be working fine.

I will however post here, if sth comes up

Thank you.

Orstio

  • Guest
Re: Unable to load the main template
« Reply #38 on: February 08, 2007, 09:49:26 PM »
Excellent.  Thanks.  :D

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,158
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unable to load the main template
« Reply #39 on: February 08, 2007, 10:26:46 PM »
interesting...   as a side note, I have the custom profile fields and visual warning mods installed ib two forums, without SEF and the sites work perfectly...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Oby

  • Newbie
  • *
  • Posts: 3
Re: Unable to load the main template
« Reply #40 on: February 10, 2007, 05:17:41 PM »
I had the same exact problem, thanks for the fix :) For me it worked fine until 1.1.7 as well, but this one line of changed code fixed it.

Offline Alcor

  • Jr. Member
  • **
  • Posts: 187
    • @cosasagapornis on Twitter
Re: Unable to load the main template
« Reply #41 on: February 21, 2007, 04:24:44 AM »
Thanks.

I had this error until this moment in "Layout and options" (in the admin panel), and I fixed replacing this line in smf.php (the Orstio solution)

Code: [Select]
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));
by

Code: [Select]
$nqsefurl = substr($nonsefurl, 0, strpos($nonsefurl, 'option')) . preg_replace('/(\;)([^=#]*)([\;#"])/', '$1$2=$2$3', substr($nonsefurl, strpos($nonsefurl, 'option'), strlen($nonsefurl)));
The com_smf version is 1.1.7, I updated it today and this code line isn't fixed.

Offline bmwsport

  • Semi-Newbie
  • *
  • Posts: 10
    • BMWsport '99
Re: Unable to load the main template
« Reply #42 on: August 05, 2010, 06:42:37 PM »
Where is this SMF.PHP file located, and where is this bridge.smf.php file located?  I can't find these files to edit the lines...

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,158
  • Gender: Male
    • Kindred-999 on GitHub
Re: Unable to load the main template
« Reply #43 on: August 05, 2010, 10:30:44 PM »
in the component directory of mambo
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.