Column cid in table cache_page is declared as VARCHAR(255) thus it wont fit URL's longer than 255 characters. URL's in utf8 are URL-encoded so 255 characters are not that long. A few words in utf8 in a URL could easily be longer than 255 characters. For example, http://drupal.org/สวัสดีดรูพัลด้วยภาษาไทยก็ยาวเกินแล้ว is encoded as http://drupal.org/%E0%B8%AA%E0%B8%A7%E0%B8%B1%E0%B8%AA%E0%B8%94%E0%B8%B5... totaling 342 characters.

Perhaps the attached patches could work?

Comments

koyama’s picture

No comments after more than 1 year? Many people must be suffering from this problem - perhaps without noticing.

Patches by ball.in.th solved the problem for a Russian Drupal site (6.16) with cyrillic URL-aliases.

Glancing at the code in Drupal 7 RC4 the problem will still persist in Drupal 7.

There may be similar problems with block caching (`cache_block` table).

Status: Needs review » Needs work

The last submitted patch, ball.cache_page2.patch, failed testing.

ball.in.th’s picture

Version: 6.14 » 6.20
Status: Needs work » Needs review
StatusFileSize
new597 bytes
new584 bytes

Yes, all pages with encoded URL longer than 255 characters are not cached at all. Since there's no watchdog warning about this, I guess most people dont know about it. Column cid in table cache_page & cache_block should also be longer than 255.

Status: Needs review » Needs work

The last submitted patch, ball.cache_page2.patch, failed testing.

ball.in.th’s picture

Status: Needs work » Needs review
StatusFileSize
new615 bytes
new602 bytes

Status: Needs review » Needs work

The last submitted patch, ball.cache_page2.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.