bdkjones / CodeKit2

CodeKit 2 Beta
97 stars 4 forks source link

Drupal login and refresh issues #210

Closed frankyonnetti closed 10 years ago

frankyonnetti commented 10 years ago

When trying to login as a Drupal admin using CK2's external server function, it's giving me an Access Denied. This happens in both Drupal 6 & 7, fresh install or active sites. Using either PathAuto or path strings (no rewrite). The reason I need to login, is to style admin UI.

Also, no browser refresh in Chrome & Firefox (latest release).

I'm using MAMP pro & CK2 beta 14

bdkjones commented 10 years ago

I need the zipped project and a database dump so I can set the project up on my machine and test it. Please post a download link to those items here, and include the username/password for the site so I can login to it once I get it set up.

Sent from my iPhone

On Jan 30, 2014, at 2:44 PM, Frank Yonnetti notifications@github.com wrote:

When trying to login as a Drupal admin using CK2's external server function, it's giving me an Access Denied. This happens in both Drupal 6 & 7, fresh install or active sites. Using either PathAuto or path strings (no rewrite). The reason I need to login, is to style admin UI.

Also, no browser refresh in Chrome & Firefox (latest release).

I'm using MAMP pro & CK2 beta 14

— Reply to this email directly or view it on GitHub.

frankyonnetti commented 10 years ago

Sorry Bryan, should have provided that to begin with. Not like you asked for that a bunch of times already :) Please let me know if you have any questions.

Fresh install of Drupal 7 using a Zen subtheme.

Theme path I dropped into CK2: drupal-ck2/sites/all/themes/codekit

Admin login un: admin pw: admin

Drupal 7 https://www.dropbox.com/s/rneywc3mo68jh1g/drupal-ck2.zip

Drupal database: https://www.dropbox.com/s/ljxaz50907wbots/drupal-ck2.sql.zip 'database' => 'codekit', 'username' => 'root', 'password' => 'root',

bdkjones commented 10 years ago

I just downloaded and installed Drupal from the Drupal website.

I can login to the site just fine on all browsers. 100% default installation of Drupal, using MAMP (no vhosts) set to host the folder where Drupal is installed using the default Apache ports (80 for HTTP and 3306 for mySQL).

It works just fine whether I add the whole Drupal folder or a theme subfolder to CodeKit as a project.

I think you've got something misconfigured with your MAMP Pro setup.

bdkjones commented 10 years ago

As for browser refreshes:

Drupal is the CMS that was dropped on its head as a child. It uses @import url(...) to bring in CSS files to your page's head element instead of using the <link> tag, as it should. Here's a discussion of why this approach is dumb: http://www.stevesouders.com/blog/2009/04/09/dont-use-import/

Short answer is that you need to use <link> tags to bring in your CSS files if you want CodeKit to be able to reload them.

frankyonnetti commented 10 years ago

The login issue is related to vhost then. That's the reason I use MAMP pro, so I can config and run multiple sites at once easily. When testing only using localhost I can log right in.

Crap, sorry about the @import issue, totally forgot about that. Enabling the link_css module fixes that issue and the refresh works as expected. https://drupal.org/project/link_css

bdkjones commented 10 years ago

So I just gave this a shot using MAMP Pro and a vhost. I clicked the "+" button in MAMP Pro to add a new server. I called it "drupaldev" and then pointed it to the folder where I had a fresh copy of Drupal downloaded.

I went through the Drupal installation process again. I added the Drupal folder as a CodeKit project and set it to use an external server with the address: http://drupaldev/

It worked perfectly. I was able to log in on both Safari and Chrome. Are you absolutely positive that you're using the latest beta?

frankyonnetti commented 10 years ago

Yup, beta 14. screen shot 2014-01-31 at 11 58 04 pm

If I do what you did, set the "Server Name" to drupaldev (or other name), I can log in without issues. But what I typically do is set my Server Name to sitename.localhost using port 80. Or I use local.sitename.com using port 80. Either of those don't work. If I don't set the port, it doesn't work either. So I guess anything more then a name (no dots, etc) doesn't allow me to login.

But other then that, the Drupal site works as it should.

bdkjones commented 10 years ago

When you add a dot, you change the domain. It's likely that this is causing the cookies sent back by the server to establish your logged-in session to be ignored. I will take a look.

bdkjones commented 10 years ago

It was indeed the domain property of the Set-Cookie header. Fixed for beta 15.