News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Help - Can't fully change theme

Started by Jsizizzle, May 06, 2017, 08:10:06 PM

Previous topic - Next topic

Jsizizzle

Hello, I'm trying to change theme's on my website. When I go by on change it in admin theme layout. I make sure to click both change overall forum and reset everyone.  Everything resets except for my portal. I don't know how to go about trying to fix this

Kindred

Are you actually using version 2.1?

Also...   URL?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Bob Perry of Web Presence Consulting

Last I heard, there was only one theme available for 2.1 aside from the default intrinsic one, and if everything else is converted correctly and the portal does not that to me sounds like you need to uninstall the portal (and all the other modules too) then reinstall them all, clear your cache afterward as well...

Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

br360

Depending on the portal mod you are using, I'm pretty sure there are settings in the portal blocks that let you choose what theme you want the portal to be.

Make sure to check the settings in the portal mod you are using

Jsizizzle

I'm using 2.13. My website is playersprogramu.com  I tried to copy files from my test website playersprogramu.com/smf which works fine switching themes and now when I try and switch themes it now does nothing. I also noticed another problem which is the first time anyone goes to my main website it doesn't load properly. When I reload it fixes the problem and it then works perfectly, but 1st time visitors see a broken website until they refresh. I would appreciate if anyone can help me fix the 2 problems I'm having. Any suggestions would be greatly appreciated

Jsizizzle

One more thing about my 2nd problem with the initial reload of my page playersprogramu.com  I asked my webhost for assistance and  I'm going to paste the reason they have below. It involves MIME type. Again I have a working test site that's working properly at playersprogramu.com/smf maybe someone here can help me get my website working properly again.  See email from my host on the problem below


The reason of incorrect loading of website upon first opening is the incorrectly inserted Content-Type header for your website and the "X-Content-Type-Options: nosniff" header during first loading. of the page. During first opening the "X-Content-Type-Options: nosniff" header states to browser to not use MIME sniffing and use MIME specified in server response. In this particular case it is "Content-Type: text/html". This is the reason of incorrect displaying of the website, because js files are not loaded correctly (in browser console you can see errors like "Refused to execute script from 'http://playersprogramu.com/?PHPSESSID=lcb2d7tves187g9qjhi0cejri0&Themes/Vertex-Theme2-0-2-v1-2/scripts/theme.js?fin20'; because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.")

During next requests the server does not return the "X-Content-Type-Options: nosniff" header anymore, so website is displaying correctly.

What should you do to resolve the issue:
You should find where exactly is set wrong content-type and replace it with correct one. In your case it should be "application/javascript" or "text/javascript""


Shambles

Try commenting out the following line from your index.php file:

Code (Find) Select
header('X-Content-Type-Options: nosniff');

Code (Replace With) Select
// header('X-Content-Type-Options: nosniff');

Jsizizzle

I pasted what is in my index.php located in the theme folder.  I don't see the line you suggested I edit. See below


<?php

// Try to handle it with the upper level index.php. (it should know what to do.)
if (file_exists(dirname(dirname(__FILE__)) . '/index.php'))
   include (dirname(dirname(__FILE__)) . '/index.php');
else
   exit;

?>

Shambles

It's the 'main' index.php file, in your forum's root folder (playersprogramu.com/index.php)

Jsizizzle

I made the change and it still hasn't fixed the problem. It did go from blue to grey in color in the index file. Any other suggestions?

Shambles

Did you use a mod to remove index.php from the URL ?


Some reading for you...

Problems with loading my website correctly.

Jsizizzle

It does seem that pretty URL may be the culprit. I don't know where to plug in what you said so I'm attaching the htaaccess file hoping someone can fix this

Arantor

Not sure why you can't go to yourforum.com/index.php?action=admin and uninstall from there. You're not actually using the pretty URL mod as far as I can tell, just the mod that removes index.php from the URL.

Jsizizzle

OK so I just removed the htaccess file and I still have the same 2 problems. I can't change my theme at all and my page does not load correctly for 1st time visitors to my website. I don't know what else I can do

Arantor

So, did you install a mod entitled 'remove index.php from forum'? If so, uninstall it.

Alternatively, did you modify the QueryString.php file to remove 'index.php' from the URL? Put it back.

Jsizizzle

I got the 2nd part of my problem fixed which was my page not loading correctly on a visitors first viewing. What I did was go to sever setting/ database path and set my site to www.playersprogramu.com instead of just playersprogramu.com. I also went to my htaccess file and added this

# AUTO REDIRECT - AVOID WWWREDIRECT
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

This removed the wwwRedirect that was coming after my web address

I'm still having the problem of not being able to change my theme. When I change the overall forum default and also change to everyone the main page does not change to the new theme but my forum and all other pages do.  I don't know how to get my main portal to change along with all other pages to the new theme


Jsizizzle

Can anyone tell me what folder file I need to look into fixing to help me be able to change themes again? I have a test forum playersprogramu.com/smf that I can change themes but i can't change themes on my real forum playersprogramu.com

Sir Osis of Liver

Admin -> Themes and Layout -> Theme Settings -> Attempt to reset all themes

Down at the bottom.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Jsizizzle

I did the reset and am still getting the main portal page staying the same and the forums are the only parts that actually have a theme change. Can't figure this out

Arantor

Quote from: Arantor on May 07, 2017, 06:04:01 PM
So, did you install a mod entitled 'remove index.php from forum'? If so, uninstall it.

Alternatively, did you modify the QueryString.php file to remove 'index.php' from the URL? Put it back.

This is still your problem, the lack of index.php in the URL. Until you change back whatever you changed to break it, nothing else will fix it.

Bob Perry of Web Presence Consulting

You'd probably fix it by uploading a fresh copy of everything from the large upgrade package, do the upgade procedure, then reinstall all your mods except anything related to changing/modifying the url... would be quicker than trying to track down what got broken in my opinion
Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Illori

it is not exactly the same process as upgrading.

https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files but i dont think it is needed if the op can follow directions and uninstall the referenced mod or revert the code change.

Jsizizzle

Sounds good. The only problem is I don't see an option for 2.013which is the version I'm using.  How do install the large update package after I download the zip file?  Do u place the zip file anywhere on my website or do I install it like a mod?

Kindred

To use the upgrade files, you need to replace the files on your server... so, no... a package update will not work
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

atsuyim

Quote from: Jsizizzle on May 08, 2017, 01:40:28 AM
I did the reset and am still getting the main portal page staying the same and the forums are the only parts that actually have a theme change. Can't figure this out

Please delete all your history and than see if it works else try another browser. Hope it works for you
Like mathematics, computer science will be somewhat different from the other sciences, in that it deals with artificial laws that can be proved, instead of natural laws that are never known with certainty.

– Donald Knuth

Jsizizzle

I did a reset and that still didn't fix it.  I also removed the index removing mod and that didn't work either.  I still can't get the main portal page to change themes.  I can change all other pages to whatever theme I'd like.  I just can't change the main pages theme. I'd like to think there's a simple fix for this and am hoping someone can figure this out for me as I'd like to change my theme.

Illori

then you should post in the portal mods support topic so they can assist you further.

Jsizizzle

My problem is not with a mod.  My problem is not being able to change the theme of my portal front page. I have a test page at playersprogramu.com/smf where I can change the theme including the front page no problem. My real page at playersprogramu.com is where I have a problem changing the theme and I can't figure out what is different between the 2 sites is that's not letting me fully change the theme on my main site. 

Sir Osis of Liver

The problem is in the theme select portal block, it's finding the theme thumbnails, but not the themes.  There's either a problem with the block code, or theme paths are incorrect in your production forum.  Look in Admin -> Look and Layout -> Theme Settings.  Are the themes installed?  Theme paths correct?  Do you see the theme files in /Themes directory?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Jsizizzle

Yes the themes are in the theme folder and the paths are correct. When I change the theme the forms and all other pages change to the theme I want. It's just the main portal page that does not change

Sir Osis of Liver

As guest, I don't see any change anywhere, it reverts back to Vertex on homepage and forum.  Are members allowed to change theme?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Jsizizzle

I don't have it set for guests to change theme.

Kindred

Quote from: Jsizizzle on May 09, 2017, 06:07:46 PM
My problem is not with a mod.  My problem is not being able to change the theme of my portal front page

Which would seem to be the very definition of a mod related problem
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jsizizzle

I posted this in portal mod and it got deleted. Can someone tell me if the main index file is what needs to be fixed?  Maybe I can copy the index file of my test site over to my real site. Would that work?  My last resort would be to upgrade 2.013 with 2.013 if possible?   How would I do an upgrade ?

Illori

no you did not post in the portal mods support topic. you made a new topic which is a duplicate of this one so it got deleted. you need to post in the correct location to get further assistance.

Arantor

And the problem I outlined is still there which is likely related...

Kindred

however... to answer your last question...

yes, loading a fresh/clean set of files and removing hooks would probably solve your issue as well.

https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Steve

As the Project Manager indicated, if you're not going to utilize the link Kindred posted, please post in the portal's support thread here: https://www.simplemachines.org/community/index.php?topic=227599.0

Locking.
DO NOT pm me for support!

Advertisement: