Repository navigation
Description
Two places where a deck asks for something, the build cannot apply it, and nothing is said. Both were found in a real import → translate session (an English 36-slide FCD → a Japanese sibling deck), and both cost hours because the only signal was the missing result.
They are filed together because they are the same defect shape and the same fix shape: the builder reaches a branch it cannot satisfy and falls through without a diagnostic.
1. Speaker notes vanish when the template's notes master has no body placeholder
sdpm/sdpm/engine/builder/__init__.py:398-405:
if "notes" in slide_def and self.write_notes:
notes_frame = slide.notes_slide.notes_text_frame
if notes_frame is not None:
...
# Else: notesMaster lacks a body placeholder (degenerate source PPTX);
# silently skip notes rather than crash the build.In the field this lost a 33-slide, 35,283-character script from the built PPTX with no warning anywhere.
Why it happens
In OOXML the notes text and the frame holding it both live on the notes slide part. The notes master is only the template used when a new notes slide is created. Measured on the source deck:
ppt/notesSlides/notesSlide1.xml : <p:ph type="sldImg"/> <p:ph type="body" idx="1"/> + <a:t>…</a:t>
ppt/notesMasters/notesMaster1.xml : no <p:ph> at all (0 elements)
So the two paths are asymmetric:
| what it does | where the frame comes from | result | |
|---|---|---|---|
| import (read) | opens the source's existing notes slide | the frame on that notes slide | 33 slides read fine; slides/*.json carries notes on 33 of 36 |
| build (write) | makes a new deck; no notes slide exists yet | only the notes master, via python-pptx clone_master_placeholders |
master is empty → 0 placeholders → notes_text_frame is None → skipped |
python-pptx behaves as documented here — NotesSlide.notes_placeholder's own docstring names this case ("it can happen if the notes master does not have a body placeholder"). It will not synthesise a body placeholder, so the gap is sdpm's lack of a fallback.
PowerPoint never surfaces this, because typing in the notes pane creates the notes slide's own body placeholder regardless of the master. A deck can therefore carry a complete script with an empty notes master and be perfectly valid — which is what the source deck is. The template sdpm extracts carries masters and layouts, so it inherits the empty notes master, while the frame information only ever existed on the notes slides, which a template does not carry.
Control experiment
Same deck, same notes string, template swapped:
| template | notes master placeholders | built notesSlide1.xml |
|---|---|---|
one with a body placeholder (body idx 3, sldImg, sldNum) |
3 | 1,809 bytes, contains the text |
| the FCD deck's own extracted template | 0 | 576 bytes, no <a:t> at all |
A second symptom that makes diagnosis harder
:399 touches slide.notes_slide before the None check on :400. Accessing that property creates the notes slide part. So a deck with this template ends up with one empty notes slide per slide — "33 notes slides, 0 characters", which reads like the notes were written and lost rather than never written.
A fallback works
Grafting a body placeholder onto the notes slide, the way PowerPoint effectively does, makes the write succeed and survive a save:
before: notes_text_frame = None
after : notes_text_frame = <TextFrame>
saved : <a:t>これは台本です。33枚のうちの1枚目。</a:t>
Suggested fix
- When the master has no body placeholder, add one to the notes slide and write the notes.
- If that is not wanted, warn naming the count and the cause ("notesMaster has no body placeholder; N slides' notes were not written") instead of the current comment.
- Either way, move the
slide.notes_slideaccess after the decision, so a deck does not collect empty notes slides.
2. A placeholder's fontSize is ignored, and so is any key the builder does not read
placeholders["0"] = {"text": "…", "fontSize": 44} builds at the layout's size. The 44 is dropped silently.
What the two placeholder paths actually read:
sdpm/sdpm/engine/builder/placeholder.py:17-38(_apply_placeholder_style):fontColor,bold,italic,align:45-52(_apply_placeholder_position):_x,_y,_width,_height,offsetX,offsetY,offsetWidth,offsetHeight
fontSize is in neither, so it is accepted into the JSON and never used. Note also that when fontColor is set at the placeholder level, :26-33 overwrites the colour of every run, so an inline {{#RRGGBB:…}} inside that placeholder is lost too.
In the field this led to rebuilding 9 placeholders as ordinary textboxes to get the size to apply, and that rework dropped fontFamily on 10 headings — damage caused by working around a silent no-op.
Suggested fix
Warn on a placeholder key the builder does not read. The set of honoured keys is already explicit in those two methods, so the check is a diff against that set. Honouring fontSize directly would be better still, but the warning is what makes the rest discoverable.
Found alongside two other engine issues from the same session, filed separately because they are fixed elsewhere in the tree.
Activity
naohito2000 commentedon Dec 2, 2026
From the same session: #720 (raw-XML group text bypasses the text pipeline) and #721 (Japanese built with a Latin-only font, with no check for an unresolved template font).
ShotaroKataoka commentedon Dec 2, 2026
🤖 KiroCrew automated comment — triage by KiroCrew on behalf of the maintainers.
Thank you for the careful write-up and the control experiment. Both parts reproduce on
main(c43f773).1. Notes dropped: confirmed. I took a copy of
blank-light.pptx, removed every placeholder from its notes master, and built one slide with"notes": "台本". The result has onenotesSlide1.xmlwithout the text, and no warning. The code is atsdpm/sdpm/engine/builder/__init__.py:398-405:slide.notes_slideis touched before theNonecheck, so the empty notes slide is created anyway.2. Placeholder
fontSizeignored: confirmed.placeholders["0"] = {"text": "Big", "fontSize": 44}builds with nosz="4400"._apply_placeholder_style(builder/placeholder.py:17-38) never reads it. This is worse than an unread key:guides/slide-json-spec.md:128,143,158documentsfontSizeon placeholders, and "Long title → reduce fontSize" is its first use case. So I would honourfontSizerather than only warn. ThefontColoroverwrite of inline colours (:26-33) is also real.Size: S for each part.
Overlap:
builder/placeholder.pyandbuilder/__init__.py, but not these paths. Expect only a small rebase.test_guide_names_builder_keys.pychecks the other direction (keys the builder reads that the guide never names). A reverse check (keys the guide names that the builder ignores) would have caught part 2.Suggested fix:
notes_placeholderisNone, add abodyplaceholder to the notes slide and write the notes, as you showed. Decide before touchingslide.notes_slide. Warn only if the graft fails.fontSizeon the runs in_apply_placeholder_style. ApplyfontColoronly to runs that carry no inline colour. Add one test for each.