When I put the option to open the forward form in a colorbox I always get redirected to the homepage after submitting te form.
It should redirect to the page you forwarded, or am I wrong here?

Comments

SandraVdv’s picture

In the forward.module on line 1152 the following code exists:

$markup = '
    <script type="text/javascript">
      (function ($) {
        $(document).ready(function() {
          $.fn.colorbox.close();
          window.location = "'. base_path() . drupal_lookup_path('alias', $returnurl).'";
        });
      })(jQuery);
    </script>';

Why is drupal_lookup_path('alias', $returnurl) used? It returns nothing if no alias is found...
if drupal_get_path_alias($returnurl) would be used it would return the alias if found, otherwise the internal drupal path. In that case a path/url is always returned and it will always redirect to the page you just forwarded.

john.oltman’s picture

Status: Active » Fixed

Agreed, this change has been committed and will be in the next DEV build.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.