WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2381 closed defect (bug) (fixed)

WP error converting URL for a domaini containing "1X"

Reported by: delluva Owned by: davidhouse
Milestone: Priority: normal
Severity: normal Version: 2.0
Component: General Keywords: 1x100.net, error converting url bg|reporter-feedback bg|has-patch bg|commmit
Focuses: Cc:

Description

Hello,

we've been experiencing the following problem while using WP 2.0 (and 2.0.1) on one of our projects.
The domain we're working on is "www.1x100.net".
WP converts the domain name into "www.1×100.net", and, obviously, stops working (the theme is not loaded correctly).

We've fixed the error by simply commenting line 36 in file "wp-includes/functions-formatting.php":

$curl = preg_replace('/(\d+)x(\d+)/', "$1×$2", $curl);

Actually we do ignore if any other problems may occour by commenting this line of code.
The problem appear to be present even if the "1x100" is the name of a folder in the complete URL.
Hope that this helps you.

Thanks for your time and your wonderful product!

lorenzo dell'Uva

Attachments (3)

x_multiplication_fix.diff (571 bytes) - added by markjaquith 8 years ago.
X multiplication fix
x_multiplication_fix.2.diff (599 bytes) - added by davidhouse 8 years ago.
2381.diff (594 bytes) - added by davidhouse 8 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 delluva8 years ago

  • Summary changed from WP error converting URL for a domaining containing "1X" to WP error converting URL for a domaini containing "1X"

comment:2 davidhouse8 years ago

I don't think we should be passing URLs through wp_texturise...

× is a multiplication sign in case anyone's interested.

comment:3 davidhouse8 years ago

  • Keywords bg|reporter-feedback added

Could you load wp-admin/options.php in your browser, find the option 'siteurl' and paste it here please? I'm wondering whether the value in the database is already incorrect or whether it's getting screwed up on the fly.

markjaquith8 years ago

X multiplication fix

comment:4 markjaquith8 years ago

  • Keywords bg|has-patch added
  • Milestone changed from 2.0.1 to 2.1
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned

This is the second time that that thing has caused problems. See #1890

The uploaded patch should fix it in the 'home' value. anything with "url" or "directory" was already excluded.

I'm actually of the opinion that this functionality should be banished, for all the trouble it has caused. If you're a math blogger, you'll likely know how to code a multiplication symbol.

comment:5 delluva8 years ago

Hello,

we've applied the fix but it doesn't work correctly. Still need to comment the line 36.
By the way the site url is displayed correctly in the wp-admin/options.php even when the system gives the error.

comment:6 davidhouse8 years ago

You probably need siteurl as well. Try this second patch.

comment:7 markjaquith8 years ago

david,
it is alread testing strstr($info, 'url'), so strstr($info, 'siteurl') is redundant (it'll always match 'url' first).

I still think this thing should be banished altogether.

comment:8 davidhouse8 years ago

You're not wrong. Strange your patch didn't work then...

delluva, could you tell us exactly what the error says? (Particularily the line number will be helpful)

Mark: I'm not sure we should give up on this quite yet. If we don't find the culprit here, removing one line from wp_texturise won't solve all the problems: it could screw up on some other regex, and we'll get further tickets in the future. Best to find where wp_texturise is being called and remove it.

comment:9 davidhouse8 years ago

  • Owner changed from markjaquith to davidhouse
  • Severity changed from critical to normal
  • Status changed from assigned to new

According to MattRead, "...the bloginfo filter passes all bloginfo calls through wptexturize".

I'll have a look at this tonight.

comment:10 davidhouse8 years ago

No idea why this took us so long to solve ;)

davidhouse8 years ago

comment:11 markjaquith8 years ago

  • Keywords bg|commmit added
  • Owner changed from davidhouse to markjaquith
  • Status changed from new to assigned

1

comment:12 davidhouse8 years ago

  • Owner changed from markjaquith to davidhouse
  • Status changed from assigned to new

*steals bug back*

comment:13 davidhouse8 years ago

  • Status changed from new to assigned

This should work now.

/me kicks trac

comment:14 ryan8 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [3681]) Don't texturize home. Props Mark Jaquith and David House. fixes #2381

comment:15 ryan8 years ago

  • Milestone changed from 2.1 to 2.0.3
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for inclusion in 2.0.3.

comment:16 ryan8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [3746]) Don't texturize home. Props Mark Jaquith and David House. fixes #2381

comment:17 anonymous7 years ago

  • Milestone 2.0.3 deleted

Milestone 2.0.3 deleted

Note: See TracTickets for help on using tickets.