Closed Bug 781066 Opened 11 years ago Closed 11 years ago

C++ Portability Guide page on MDN is missing

Categories

(developer.mozilla.org Graveyard :: Editing, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 780363

People

(Reporter: heycam, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120806030517

Steps to reproduce:

Visited https://developer.mozilla.org/en/docs/C++_Portability_Guide.


Actual results:

It wants me to edit a new page.


Expected results:

I should see the original content. :)
Investigating... 

First thing is that the URL mentioned in comment #0 is incorrect. There is no "en" locale, only "en-US". Not sure where that URL came from. But, I think our redirects *should* adjust for this.

The document exists in the DB:

mysql> select id,locale, slug, title from wiki_document where slug='C++_Portability_Guide';
+-------+--------+-----------------------+-----------------------+
| id    | locale | slug                  | title                 |
+-------+--------+-----------------------+-----------------------+
| 20301 | en-US  | C++_Portability_Guide | C++ Portability Guide |
| 20300 | ja     | C++_Portability_Guide | C++ Portability Guide |
+-------+--------+-----------------------+-----------------------+
2 rows in set (0.00 sec)

And, also it appears in the admin view (limited access):

    https://developer.mozilla.org/admin/wiki/document/?id__exact=20301

But, even its new-style URL in Kuma is 404:

    https://developer.mozilla.org/en-US/docs/C++_Portability_Guide
Hmm, I suspect that "++" in the URL path is being turned into "  " by Apache. Doesn't seem to be reaching the Django application at all
Another weird thing, I can't even get to the page with URL-encoded "+"'s:
    https://developer.mozilla.org/en-US/docs/C%2B%2B_Portability_Guide
Yeah, looks like URL path sequences like "++" and "%2B%2B" get turned into "  " by mod_rewrite. That's very low level in our HTTP stack, and makes this very hard to fix.

Looks like we only have 4 documents with "+" in the slug:

mysql> select id,locale, slug, title from wiki_document where slug like '%+%';
+-------+--------+----------------------------+-----------------------+
| id    | locale | slug                       | title                 |
+-------+--------+----------------------------+-----------------------+
| 20299 | en-US  | Missing_GDI+_Library       | Missing GDI+ Library  |
| 20300 | ja     | C++_Portability_Guide      | C++ Portability Guide |
| 20301 | en-US  | C++_Portability_Guide      | C++ Portability Guide |
| 20302 | en-US  | Talk:C++_Portability_Guide | C++ Portability Guide |
+-------+--------+----------------------------+-----------------------+
4 rows in set (0.05 sec)

So, I guess my question is this: Say we convert "+" in URL paths for these 4 documents to "_" what links might break? I can find only 3 references to "C++_Portability_Guide" within the wiki:

mysql> select id,locale, slug, title from wiki_document where html like '%C++_Portability_Guide%';
+-------+--------+-----------------------------------+-------------------------+
| id    | locale | slug                              | title                   |
+-------+--------+-----------------------------------+-------------------------+
|   416 | en-US  | Developer_Guide/Coding_Style      | Coding Style            |
|  9393 | en-US  | Project:Existing_Content          | Existing Content        |
| 42115 | en-US  | User:Dria/hacking_guide_migration | hacking guide migration |
+-------+--------+-----------------------------------+-------------------------+
3 rows in set (1.03 sec)

Maybe we can toss in a mod_rewrite rule to change "++" to "__" early on in the process to try to catch the issue and redirect.
Blocks: 756266
(In reply to Les Orchard [:lorchard] from comment #4)
> So, I guess my question is this: Say we convert "+" in URL paths for these 4
> documents to "_" what links might break? I can find only 3 references to
> "C++_Portability_Guide" within the wiki:

I think you missed at least 2 articles for ja locale.

https://developer.mozilla.org/ja/docs/Hacking_Mozilla
https://developer.mozilla.org/ja/docs/Developer_Guide/Coding_Style

These documents contains the link to C%2b%2b_Portability_Guide.
What about "<" and ">" as mentioned in bug 781328 ?
(In reply to Florian Scholz [:fs] from comment #6)
> What about "<" and ">" as mentioned in bug 781328 ?

Covered under the broader bug 780363
Depends on: 780363
I don't *think* mod_rewrite is getting in the way here; we don't have any rules I can find that would swap '+' to space, and I'm ending up at the "create new page" with a "slug=C++_Portability_Guide", which means the + is getting through to kuma.
Priority: -- → P1
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Version: Kuma → unspecified
Component: Docs Platform → Editing
No longer blocks: 756266
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.