Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2381 closed defect (bug) (fixed)

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

Reported by: delluva's profile delluva Owned by: davidhouse's profile 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 19 years ago.
X multiplication fix
x_multiplication_fix.2.diff (599 bytes) - added by davidhouse 19 years ago.
2381.diff (594 bytes) - added by davidhouse 19 years ago.

Download all attachments as: .zip

Change History (20)

#1 @delluva
19 years ago

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

#2 @davidhouse
19 years ago

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

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

#3 @davidhouse
19 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.

@markjaquith
19 years ago

X multiplication fix

#4 @markjaquith
19 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.

#5 @delluva
19 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.

#6 @davidhouse
19 years ago

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

#7 @markjaquith
19 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.

#8 @davidhouse
19 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.

#9 @davidhouse
19 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.

#10 @davidhouse
19 years ago

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

@davidhouse
19 years ago

#11 @markjaquith
19 years ago

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

1

#12 @davidhouse
19 years ago

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

*steals bug back*

#13 @davidhouse
19 years ago

  • Status changed from new to assigned

This should work now.

/me kicks trac

#14 @ryan
19 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

#15 @ryan
19 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.

#16 @ryan
19 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

#17 @(none)
18 years ago

  • Milestone 2.0.3 deleted

Milestone 2.0.3 deleted

Note: See TracTickets for help on using tickets.