Took over an website and still exploring. I'm trying to make sure only register users can fill out and submit on a webform using access control. Webform then would show the line [You must login or register to view this form.]

However, when the page is presented, the links to the login and register is wrong.

I tried on a clean install of Drupal and the links seems fine. I can't figure out why. The link to the page is http://www.showtv.com.tw/node/1097 (The block in orange is the text, it has been translated to Traditional Chinese). The links for some reason points back to the page itself.

Any help would be appreciated.

Comments

steve.chen’s picture

more detail:

The code in webform.module is $message = t('You must "<a href="!login">login</a> or <a href="!register">register</a> to view this form.', array('!login' => url('user/login'), '!register' => url('user/register')));

Did a clean upgrade to 5.x-2.7 from 5.x-2.4, so the code is for sure unmodified.

So for some reason !login and !register are not pointing to where they should. They are pointing to the current page instead.

quicksketch’s picture

Status: Active » Closed (fixed)

I'm not sure how these URLs could be pointing to the wrong location. I'd check if your site is doing anything strange like custom_url_rewrite() in settings.php. It's clear that from a fresh install of Drupal, this does not present a problem.