1

I have a Drupal site that I am currently developing on a local environment. Recently I uploaded my site to a "live" environment and everything seems to load fine except for all admin functionality. My local server runs with http, while the "live" server configuration runs securely with https. I have noticed that I cannot get into the Drupal admin pages and forms with the Drupal site when running https on the "live" server. Both the overlay and regular admin pages wont load. When clicking a toolbar menu item I get the following javascript console errors: Empty string passed to getElementById(). 5 times, and Error: permission denied to access property "document". Weird... I cant 100% say that this is an https problem, but it seems to be the case.

With more research involving http vs https with Drupal sites, I learned of the securepages module. I have since installed it but cannot enable it on the "live" instance of the site due to none of the admin pages working. I also tried enabling it via drush and it wasn't working for me. So then I figured why not try to enable it on the local version and then upload the database and modules to the live site. I couldn't do that either because my local connection is http and the secure pages module will only allow enabling when its detected SSl. See the conundrum? Has anyone ever seen this before?

  • To isolate the problem, what happens when you browse to /admin on your live server? Everything you describe sounds like JS execution problems, not problems with retrieving admin pages. – Shawn Conn May 15 '15 at 21:45
  • Could you look in the source of the page and see if the javascript files are also loaded over https? – Maarten De Block May 16 '15 at 6:09
  • What kind of hosting are you using ? – jowan sebastian May 16 '15 at 11:33
  • @ShawnConn I do not get any js errors from trying to go to /admin, and it does not work. @user1081275 the server is run by my clients. They have their own server that runs the whole stack and they force ssl when running on their server. – cwahlfeldt May 16 '15 at 15:25
1

Yes. How you fix this depends on what you built and what you did. You did not say if you built a Drupal 6 or 7 site. It makes a big difference. You also did not say what mods you made to the settings.php file if any when you uploaded this new site.

Your $base_protocol $base_url

AND a $conf statement as to HTTPS will need to be properly set - depending on which version of Drupal you are using

You may need to modify the DNS zone to accept a wildcard for the domain depending on what kind of site and content it already has and the

$cookie_domain may need to be properly addressed or Drupal (depending on which one you have ) may drop sessions and log people out by dropping the session if they switch between secures pages classes. See the issues que of secure pages for examples - and make sure you are looking at the issue that has to do with whichever version you have installed - Drupal 7 and Drupal 6 respond completely differently to SSL and HTTPS issues See https://www.drupal.org/project/issues/securepages?categories=All

See https://www.drupal.org/https-information for a head start and pointers

As to getting the admin pages to work - usually creating and setting $conf['https'] = FALSE; should allow http access again by forcing the entire site to non-secure

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.