Ticket #2381 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: delluva Assigned to: davidhouse
Priority: normal Milestone:
Component: General Version: 2.0
Severity: normal Keywords: 1x100.net, error converting url bg|reporter-feedback bg|has-patch bg|commmit
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

x_multiplication_fix.diff (0.6 kB) - added by markjaquith on 02/07/06 09:34:32.
X multiplication fix
x_multiplication_fix.2.diff (0.6 kB) - added by davidhouse on 02/15/06 17:03:17.
2381.diff (0.6 kB) - added by davidhouse on 04/01/06 14:30:33.

Change History

02/03/06 16:32:50 changed by delluva

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

02/04/06 14:22:55 changed by davidhouse

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

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

02/04/06 15:01:22 changed by davidhouse

  • keywords changed from 1x100.net, error converting url to 1x100.net, error converting url bg|reporter-feedback.

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.

02/07/06 09:34:32 changed by markjaquith

  • attachment x_multiplication_fix.diff added.

X multiplication fix

02/07/06 09:36:46 changed by markjaquith

  • keywords changed from 1x100.net, error converting url bg|reporter-feedback to 1x100.net, error converting url bg|reporter-feedback bg|has-patch.
  • owner changed from anonymous to markjaquith.
  • status changed from new to assigned.
  • milestone changed from 2.0.1 to 2.1.

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.

02/15/06 16:39:33 changed by delluva

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.

02/15/06 17:02:47 changed by davidhouse

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

02/15/06 17:03:17 changed by davidhouse

  • attachment x_multiplication_fix.2.diff added.

02/16/06 01:18:55 changed by markjaquith

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.

02/16/06 09:51:16 changed by davidhouse

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.

03/31/06 11:22:40 changed by davidhouse

  • owner changed from markjaquith to davidhouse.
  • status changed from assigned to new.
  • severity changed from critical to normal.

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

I'll have a look at this tonight.

04/01/06 14:29:34 changed by davidhouse

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

04/01/06 14:30:33 changed by davidhouse

  • attachment 2381.diff added.

04/02/06 07:01:02 changed by markjaquith

  • keywords changed from 1x100.net, error converting url bg|reporter-feedback bg|has-patch to 1x100.net, error converting url bg|reporter-feedback bg|has-patch bg|commmit.
  • owner changed from davidhouse to markjaquith.
  • status changed from new to assigned.

1

04/02/06 09:06:24 changed by davidhouse

  • owner changed from markjaquith to davidhouse.
  • status changed from assigned to new.

*steals bug back*

04/02/06 09:09:12 changed by davidhouse

  • status changed from new to assigned.

This should work now.

/me kicks trac

04/03/06 03:04:41 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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

04/22/06 00:26:58 changed by ryan

  • status changed from closed to reopened.
  • resolution deleted.
  • milestone changed from 2.1 to 2.0.3.

Reopen for inclusion in 2.0.3.

04/22/06 00:27:33 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

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

11/30/06 19:41:50 changed by

  • milestone deleted.

Milestone 2.0.3 deleted