Jump to content
TNG Community

Template Switch Mod


tngrlkrz

Recommended Posts

Just posted a new Template_Switch mod.  It is a variation of a private mod I use for testing across TNG templates,  and also can be used to offer users ability to select  templates.  Much faster switching between templates without entering Administration.  It is supported on TNG 12.3 and greater. 

Link to comment
Share on other sites

Hi,

I did encounter that anomaly during testing.  In my case, I found once I had a correct logfile path defined in Prolog (error log reporting mod), all worked OK.  I have it running both on my personal local sites, and on my test and production Websites, but all of them do have Prolog installed. I don't understand why this happens myself, and hoping someone else has an idea after looking at my mod's code.

Do you have error log reporting setup on the local host and not on the website? Could you try installing Prolog_Mod to see if it then works?  It is just a workaround for now.

I put a cautionary note in the wiki article on this, and appreciate your reporting it.

Link to comment
Share on other sites

I don't know how it happened, but it started to work ... :)

I turned it into template_setting.php

header('Location: ' . $_SERVER['HTTP_REFERER']);

to

header('Location: ' . $_SERVER['HTTPS_REFERER']);

but there was an error, so I restored the settings and it worked.

 

Link to comment
Share on other sites

1 hour ago, Janusz said:

header('Location: ' . $_SERVER['HTTPS_REFERER']);

Yea...that causes a white screen.  No idea why restoring fixed it though.

Link to comment
Share on other sites

1 hour ago, Ken Roy said:

Ron,

It might be because https might not be valid option.

Ken,

I am aware of that. It was just something Janus tried. I had http.

I don't understand why installing prolog causes the mod to work.

Link to comment
Share on other sites

53 minutes ago, Janusz said:

Yes, no mistakes.

Sorry, what does that mean?  You installed Prolog, and Template Switch still doesn't work?

Link to comment
Share on other sites

I already wrote that Template Switching works. I've installed the Porlog, but now it shows nothing.

vor 3 Stunden schrieb Janusz:

I don't know how it happened, but it started to work ... :)

I turned it into template_setting.php

header('Location: ' . $_SERVER['HTTP_REFERER']);

to

header('Location: ' . $_SERVER['HTTPS_REFERER']);

but there was an error, so I restored the settings and it worked.

 

 

Link to comment
Share on other sites

1 hour ago, Janusz said:

I've installed the Porlog, but now it shows nothing.

Sorry Janus, just trying to confirm the sequence of events.

Did Template Switching first start working after you installed Prolog?  (no errors are expected, just that the error logfile path is setup).

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...