I recently took on an abandoned project from a "reputable" developer. The template and CSS was developed for the site, but never populated with content . The owner of the site recently sent me the source code and after installing it on my test server, I started running into some issues.
I have done numerous searches in the forums for this issue, but have yet to find a solution. What is happening is similar to what alot of Drupal migrations encounter. The front page of the site is up and displaying properly, but when I click on the Primary Links, it redirects in a strange way. Now first let me mention, the site is hosted in a sub-folder at testserver.mywebsite.com/kimbooker, and i have adjusted the .htaccess file to reflect that (I will post it below). The strange thing is that the secondary links work and redirect fine, as well as some of the test blog posts. Here is what is happening.
On homepage of site : testserver.mywebsite.com/kimbooker
Click on primary page link and browser redirects to: testserver.mywebsite.com/primarylinkname
What SHOULD happen is browser redirect to: testserver.mywebsite.com/kimbooker/primarylinkname
Once again, I have changed the .htaccess file to reflect the subfolder location, but still with no success. The secondary links ARE working correctly however, and the primary pages will work if I correctly key in the URL by hand.
Anyone have any suggestions as to whats going on?
# Various rewrite rules.
RewriteEngine on
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
#RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
#RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
RewriteBase /kimbooker
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.90.2.3 2008/12/10 20:04:08 goba Exp $
Comments
My first guess would be the
My first guess would be the $base_url is set in the settings.php file.
# $base_url = 'http://www.example.com'; // NO trailing slash!
My second is that somewhere there is a url_rewrite happening- check for
custom_url_rewrite_outbound (6) or hook_url_outbound_alter (7)
I seem to recall a module that had you add a function to the settings.php file to do this also, so check for that while checking for the base_url setting.
Thought of another- if you are using a custom theme check the template.php file and the page template(s). They may have a custom function for the primary menu generation.
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.
Thanks for your response!
Thanks for your response!
Everything in settings.php checks out. BaseURL is set correctly. After peering into the page.php and template.php in the custom theme, still nothing that I can see. Im extremely new to Drupal, so I may be overlooking something. The link to the site is testserver.infocusmediainc.com/kimbooker.
In addition to the primary link issue, I have now encountered another one. This resides within the top Nav bar. It is completely unresponsive EXCEPT when used in Chrome on my laptop. There it functions correctly. Strange. What is happening is Drupal seems to be changing the menu class from l1,l2,l3, etc. to menu-## (random number). When I change it to reflect the correct class name using Firebug or Dev tool in Chrome, it functions fine. My problem now is locating where the class change is happening. Any suggestions there?
Thanks for your
Thanks for your response!
Everything in settings.php checks out. BaseURL is set correctly. After peering into the page.php and template.php in the custom theme, still nothing that I can see. Im extremely new to Drupal, so I may be overlooking something. The link to the site is testserver.infocusmediainc.com/kimbooker.
In addition to the primary link issue, I have now encountered another one. This resides within the top Nav bar. It is completely unresponsive EXCEPT when used in Chrome on my laptop. There it functions correctly. Strange. What is happening is Drupal seems to be changing the menu class from l1,l2,l3, etc. to menu-## (random number). When I change it to reflect the correct class name using Firebug or Dev tool in Chrome, it functions fine. My problem now is locating where the class change is happening. Any suggestions there?
the unresponsiveness is due
the unresponsiveness is due to the CSS - all the links are shoved over to the far left.
You may want to use firefox to disable CSS and even js until the first issue is resolved.
or fix the css first :) The style is playing fast and loose with absolute positioning on the links - just user FF webdev and add outlines or backgrounds to positioned elements and you'll see what I mean.
I'm unique, just like everybody else.
If I helped, please pay it forward, backward or sidelong.
Right
I was able to figure that out. The problem is the links are receiving the wrong class name. If changed to the correct class in web Dev, everything functions as it should. The issue I am having is figuring out why/where it's generating the "menu-###" class name instead of the assigned l1'l2,l3, etc...it seems like something that Drupal is randomly generating.
Bump.
Bump.