Closed Bug 773285 Opened 12 years ago Closed 12 years ago

Kuma: Attachments - KumaScript code needs ability to access attachments

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheppy, Assigned: davidwalsh)

References

Details

Required for or very very soon after launch in order to finish porting templates.

KumaScript code needs the following capabilities regarding attachments:

* Get the number of attachments
* Get a list of attachments (each should be a record with information like URL, size, mimetype, etc)
* Read the contents of a specific attachment

You should look at these docs to see the type of stuff MindTouch let us do:

(It offered page.files, a list of the files, which provided all the other capabilities). Each file object was as documented below:

http://developer.mindtouch.com/en/docs/DekiScript/Reference/Wiki_Functions_and_Variables#File_Object
Blocks: 773292
No longer blocks: 756263
I'm blocked on this by:

https://bugzilla.mozilla.org/show_bug.cgi?id=773638

I've added the "attachments" object to the environment, but my KumaScript template refuses to load;  I see the error message cited in the ticket above.

We have must of what's in the MindTouch File Object available on our attachment object now, with the exception of a list of pages it's used on, content, and image dimension properties.
Blocks: 771763
No longer blocks: 773292
Priority: -- → P2
(In reply to David Walsh :davidwalsh from comment #1)
> I'm blocked on this by:
> 
> https://bugzilla.mozilla.org/show_bug.cgi?id=773638

I'm still not sure how that bug blocks this one... That one is about a template that show kumascript errors, but it shouldn't have anything to do with how kumascript gets variables. In fact that template comes into play well after kumascript calls.

Do you have PR or a branch somewhere I could look at?
I played around with this and have found myself to be a liar;  I finally got something working.  nm....
Assignee: nobody → dwalsh
Pull request provided here:

https://github.com/mozilla/kuma/pull/413/files
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/f142c42afbd7a4d1d039e4fd42191c4b5b6adcec
fix bug 773285 - Adding attachments information to kumascript environment

https://github.com/mozilla/kuma/commit/107416b891b9a5a0908a71ea7b36ac5efdca3903
Merge pull request #413 from darkwing/kumascript-attachments-773285

fix bug 773285 - Adding attachments information to kumascript environment
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Priority: P2 → P1
Version: Kuma → unspecified
Component: Website → Landing pages
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.