WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#5187 closed defect (bug) (fixed)

Search Widget Redirect Problem

Reported by: lexhair Owned by:
Milestone: 2.7 Priority: low
Severity: minor Version: 2.2.3
Component: Widgets Keywords: needs-patch dev-feedback
Focuses: Cc:

Description

On my install, bloginfo('url') does not return a trailing slash so when I use the default search widget, the form action url is malformed. The search still works but it redirects to www.mydomain.com rather than mydomain.com. My patch simply added a trailing slash after the bloginfo call. Diff attached.

Attachments (1)

search_widget.diff (533 bytes) - added by lexhair 8 years ago.
Search Widget Patch

Download all attachments as: .zip

Change History (5)

@lexhair8 years ago

Search Widget Patch

comment:1 @mrmist7 years ago

  • Keywords needs-patch 2nd-opinion added

I'm not convinced that the best thing to do here is to patch the search widget. After all, the issue is that the blog url is not being returned with the trailing slash. IMO It'd be better to make bloginfo("url") return with a trailing slash - especially so since that's where the browser gets redirected to.

(In general though the situation still applies, though I'm not convinced it is the actual cause of the problem, or even that this is a problem, as the search form works fine for me regardless..)

Still current at 2.7

comment:2 @Denis-de-Bernardy7 years ago

  • Keywords dev-feedback added; 2nd-opinion removed

err... in the latest 2.7 branch, get_search_form() users get_option('home') . /

we can probably close this one as invalid or fixed.

comment:3 @ryan6 years ago

  • Milestone changed from 2.9 to 2.7
  • Resolution set to fixed
  • Status changed from new to closed

comment:4 @ryan6 years ago

  • Component changed from General to Widgets
Note: See TracTickets for help on using tickets.