When you have two domains pointing to the same drupal installation there is no url alias in not always correct.

For example:
We have domain www.example.com as a public frontend.
We have domain preview.example.com as a fronted for the editors ( access limited by an htpasswd )

You would like to url alias of the node always pointing to www.example.com but that is not always the case. Atm there is no way to modify the url stored in the node

Comments

LuCarD’s picture

My workaround:

Code in my own module ( NOT IN THE DISQUS MODULE )

/**
 * Implements hook_element_info().
 */
function MYMODULE_element_info_alter( &$types ) {
  if ( isset( $types['disqus'] ) )  {
    $types['disqus'][ '#post_render' ] = array('MYMODULE_disqus_element_post_render');
  }
}

function MYMODULE_disqus_element_post_render( $children, &$element ) {
    if ( isset( $element['#disqus']['url'] ) ) {
        $element['#disqus']['url'] = 'http://www.example.nl/' . url( $element['#disqus']['identifier'] );
    }
    return disqus_element_post_render( $children, $element );
}
hasmimeraj’s picture

Issue summary: View changes

Above solution does not work for me.. I am using disquss Version: 7.x-1.12+7-dev

I have put above code in my custom module and replace url with my own but no luck.

Any help would be appreciated.