tngrlkrz Posted November 6, 2020 Report Share Posted November 6, 2020 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. Quote Link to comment Share on other sites More sharing options...
Janusz Posted November 9, 2020 Report Share Posted November 9, 2020 (edited) Hello, Ron. Interesting mod, but unfortunately for me it works only on the local TNG, in the network no longer switches the template. Do you have any idea? My Site https://kielakowie.pl/index.php Edited November 9, 2020 by Janusz Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted November 9, 2020 Author Report Share Posted November 9, 2020 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. Quote Link to comment Share on other sites More sharing options...
Janusz Posted November 9, 2020 Report Share Posted November 9, 2020 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. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted November 9, 2020 Author Report Share Posted November 9, 2020 1 hour ago, Janusz said: header('Location: ' . $_SERVER['HTTPS_REFERER']); Yea...that causes a white screen. No idea why restoring fixed it though. Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted November 9, 2020 Report Share Posted November 9, 2020 Ron, It might be because https might not be valid option in the referer. See PHP Superglobal - $_SERVER Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted November 9, 2020 Author Report Share Posted November 9, 2020 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. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted November 9, 2020 Author Report Share Posted November 9, 2020 Janus, did you try prolog? Quote Link to comment Share on other sites More sharing options...
Janusz Posted November 9, 2020 Report Share Posted November 9, 2020 Yes, no mistakes. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted November 9, 2020 Author Report Share Posted November 9, 2020 53 minutes ago, Janusz said: Yes, no mistakes. Sorry, what does that mean? You installed Prolog, and Template Switch still doesn't work? Quote Link to comment Share on other sites More sharing options...
Janusz Posted November 9, 2020 Report Share Posted November 9, 2020 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. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted November 9, 2020 Author Report Share Posted November 9, 2020 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). Quote Link to comment Share on other sites More sharing options...
Janusz Posted November 9, 2020 Report Share Posted November 9, 2020 First started working Template Switching, then I installed Prolog. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.