Welcome, Guest
Username Password: Remember me

Registration and Contact Redirecting to Same Link
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Registration and Contact Redirecting to Same Link

Registration and Contact Redirecting to Same Link 9 years, 8 months ago #1472

  • mtupstairs
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
I have created custom pages for both registration blocks and contact form blocks. When I test a contact form block, I get redirected to the same page as the registration block though I have entered a different link for contact block redirects. Perhaps something simple that I am missing (since no one else has posted this) but it has me confused.

Thanks

Re:Registration and Contact Redirecting to Same Link 9 years, 7 months ago #1514

  • mtupstairs
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
I am going to assume no one reads / responds to this forum any longer.

Re:Registration and Contact Redirecting to Same Link 9 years, 6 months ago #1541

  • jkinane
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
I just posted the same issue. Having looked at the code in cedit_blockdisposable.php I can't see any reference to the database field which contains the URL relating to the Contact Form. See this entry in the xml data which sets up the Contact URL:

<param name="redirectaddresscontact" type="textarea" cols="30" rows="2" default="" label="Contact Redirect URL" description="This is the URL to which the user will be redirected if their details fail the contact form validation check."/>

I'm not a php programmer, but what I did was to create a second variable which sets the Contact redirect URL and use that variable in the code which handles a positive hit on the Contact form.

line 99 to set a new variable:
$redirectcontact = $this->_params->get('redirectaddresscontact','');

line 281 - 288 now reference the new variable:

// Contact form submission blocked
JRequest::setVar( 'task', '' );
if ( $redirectcontact == '' ) {
$redirectcontact = "index.php?option=com_contact&view=contact&id=" . JRequest::getVar('id' ) . "&Itemid=" . JRequest::getVar('Itemid' );
}
plgSystemCedit_BlockDisposable::Log( 'Contact form blocked - redirecting to ' . $redirectcontact);
plgSystemCedit_BlockDisposable::CloseLogFile();
$mainframe->redirect( $redirectcontact, $blockReason );


As I say, I'm no php programmer, but this works ok, despite its ugliness!
Last Edit: 9 years, 6 months ago by jkinane. Reason: spelling

Re:Registration and Contact Redirecting to Same Link 9 years, 6 months ago #1544

  • jkinane
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Ok - here's a much simpler fix. Instead of the several changes in previous post, just insert the following after line 282 in the original 1.3.3 version:

$redirect = $this->_params->get('redirectaddresscontact','');

Re:Registration and Contact Redirecting to Same Link 9 years, 6 months ago #1545

  • mtupstairs
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Thank you very much for posting. I will try ASAP. I really can't imagine not having this extension as I have not seen anything that works as well in terms of blocking the emails.

Re:Registration and Contact Redirecting to Same Link 9 years, 6 months ago #1546

  • jkinane
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
No problem. Hope it works for you. I've only installed it yesterday and it seems to generate the appropriate re-directs since my patch. I think the original author is more focussed on version 2 at the moment as he does not seem to be active in this particular forum.

Re: Registration and Contact Redirecting to Same Link 9 years, 6 months ago #1575

Thanks for posting this fix, and sorry for not responding myself to the original queries. As you have shown, it is a problem with RV. I will implement this fix in the version available on the site within a few days.

Re: Registration and Contact Redirecting to Same Link 9 years, 6 months ago #1577

  • jkinane
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
No bother purplepomegranate (or granite!). Glad to put something back.
  • Page:
  • 1
Time to create page: 0.22 seconds
Copyright © 2009 www.cedit.biz. All rights reserved.