We Rock Your Web in the Press!

What to do when you get the error message “URL Is Not Valid and Cannot Be Loaded” in Drupal?

Home Forums Tech Web Development What to do when you get the error message “URL Is Not Valid and Cannot Be Loaded” in Drupal?

Post a New Topic

This topic contains 3 replies, has 3 voices, and was last updated by  Alex Schenker 5 years, 9 months ago.

  • Author
    Posts
  • #10552

    I recently had the error message “URL Is Not Valid and Cannot Be Loaded” pop up as I tried to log into my Drupal site from the main page (the error did not occur when I logged in from /user). Any clue how to fix?

  • #10554

    Alex Schenker
    Keymaster

    The Problem

    This error pops up when Drupal cannot resolve the path for the front page in the login form. The problem in my case was that I had the front page link as “/” (under settings -> general -> default front page). The problem was the backslash, which you are advised not do use, but I used it because I didn’t like having the “node/3″ attached to the URL when “forward this page” was selected. In my case the new link would show as //, instead of /node/3, and since I have .htaccess setup to remove trailing slashes (not generally recommended, but there’s a specific reason I do this that I’ll explain if you’re interested – just comment below) it would resolve to /, which is the appropriate URI formulation.

    The Solution

    I had to remove the trailing slash and now the login works fine. The form code now shows:

    <form action="/node/1?destination=">

    instead of:

    <form action="//?destination="">

    Hope this helps. If this did not solve your problem please comment below.

    • #10767

      Guest
      Participant

      Hi, so where do you make the change, and how do you get to it to change it to < form action=”/node/1?destination=” >?
      Thanks!

      • #10769

        Alex Schenker
        Keymaster

        Make sure you don’t have any backslashes set for the location of your front page. For example, if you browse to Drupal’s Site Configuration -> Site Information, the front page should be set to “node” (or a specific path) not “/node” or “/”.

You must be logged in to reply to this topic.