Kuma: KumaScript - Do what we need to get the autoPreviousNext template working

RESOLVED FIXED

Status

Mozilla Developer Network
Wiki pages
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: sheppy, Unassigned)

Tracking

Details

(Reporter)

Description

6 years ago
This template:

https://developer-new.mozilla.org/en-US/docs/Template:autoPreviousNext

Is trying to do stuff we don't have support for. It's used in a lot of places, such as:

https://developer-new.mozilla.org/en-US/docs/JavaScript/Guide/Values,_Variables,_and_Literals

Although we would survive if this were broken at launch it would not be good, since it would make some of our most popular content (like our JS docs) not as easy to read through.
This might be partly blocked by bug 765642, in that there's not an easy way to fetch web content and parse XML at the moment.

There might be a workaround though
Depends on: 765642
The autoPreviousNext template should be working now:

https://developer-new.mozilla.org/en-US/docs/JavaScript/Guide/About

I got the template in working shape on a test page. Then, I stepped through the JS guide, and had to make this change to most pages:

https://developer.mozilla.org/Project:en/Introduction_to_KumaScript#Unconverted_inline_script_blocks

I'm not sure if any other series of pages uses autoPreviousNext, but they may need that inline script fix as well.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

6 years ago
(In reply to Les Orchard [:lorchard] from comment #2)
> The autoPreviousNext template should be working now

If anyone ever asks if you're a god, you don't have to lie to say "yes." Nicely done!

Comment 4

6 years ago
I've fought against this template a bit yesterday.
It's interesting to see how it was fixed.
Well, the biggest hurdles I think were that these things didn't exist until I was done:

* Template:Dekiscript:String - string.serialize, string.deserialize
* Template:Dekiscript:Wiki - wiki.getPage

Had to fill those in the dekiscript modules before tweaking autoPreviousNext to work, but hopefully the wiki.getPage implementation shows some more detail on how to make HTTP requests out from kumascript. It's not friendly to do yet, but I'm hoping to wrap it in friendly module methods
(Assignee)

Updated

5 years ago
Version: Kuma → unspecified
(Assignee)

Updated

5 years ago
Component: Website → Landing pages
Product: Mozilla Developer Network → Mozilla Developer Network
You need to log in before you can comment on or make changes to this bug.