Edit link form action=""

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-18-2007, 12:17 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
When a user submits the edit link form it reloads the editlink.php page but with no variable set for the id. This results in a blank page when you submit your edit. I think that this partly due to the fact that the action parameter of the form is set to nothing (ie: action="").

Any ideas on how we can fix this so that when the form is submitted it either takes the user back to the form with the changes made or better yet takes the user to the story page (would need to work with friendly urls - not just story ids).

I am guessing that both editlink.php and editlink_edit_center.tpl will need to be modified to fix this.

Last edited by revolver; 01-18-2007 at 12:22 PM.
Reply With Quote
  #2 (permalink)  
Old 01-18-2007, 12:31 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
Sorry ... the problem appears to have nothing to do with the form action="" ...

I think that the following line in editlink.php just needs some tweaking ...
header('Location: ' . getmyurl('story', $_POST['id']));

To redirect to the story page it needs to change to ...
header('Location: ' . getmyurl('storyURL', CATEGORYNAME, STORYSAFETITLE));

The problem is i don't know how the actual variables to use instead of CATEGORYNAME and STORYSAFETITLE.

Last edited by revolver; 01-18-2007 at 12:39 PM.
Reply With Quote
  #3 (permalink)  
Old 01-18-2007, 02:12 PM
Constant Pligger
 
Join Date: Oct 2006
Posts: 220
ok ... this sees to do it:
header('Location: ' . getmyurl('storyURL', $linkres->category_safe_name(),$linkres->title_url));

Can anybody seem any problems with this?
Reply With Quote
  #4 (permalink)  
Old 01-21-2007, 01:30 PM
Pligg Donor
 
Join Date: Dec 2006
Location: Amsterdam
Posts: 30
Quote:
Originally Posted by revolver View Post
ok ... this sees to do it:
header('Location: ' . getmyurl('storyURL', $linkres->category_safe_name(),$linkres->title_url));
Thanks, that fixed it for me as well (beta 9).

This may have something to do with friendly url's for stories and categories (I've both set to yes) and the url method (mine is set to 2).
Reply With Quote
  #5 (permalink)  
Old 01-24-2007, 12:30 AM
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
Hmm.. this must have been fixed since beta 9 was released because I just tested editing a comment with both URL methods and it redirected me to the story page just fine each time.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit link bug cucat Questions and Comments 2 01-21-2009 07:58 PM
Better Submit and Edit Link pages AnAlienHolakres3 Questions and Comments 3 07-24-2008 09:44 AM
edit story and outgoing link returns blank page crusty Questions and Comments 0 08-23-2007 03:30 PM
Edit comment link not working Dubai Questions and Comments 18 01-24-2007 01:04 PM
How can I edit Link of title to directly website coreduo Questions and Comments 2 10-16-2006 02:54 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development