Conversation
…boolean When `main page title url opens in other window` is set to a YAML boolean (e.g. `False`), the default_title initialization in Interview.__init__ called `.strip()` on the bool value, raising `AttributeError: 'bool' object has no attribute 'strip'`. Wrap the value with `str()` before `.strip()`, consistent with how the same loop already handles metadata values on the lines above (lines 8441, 8443). The downstream consumer in helpers.py already compares via `str(status.title_url_opens_in_other_window) == 'False'`, so the string representation flows through correctly. Fixes jhpyle#980
jacobyoby
marked this pull request as draft
September 1, 2026 17:59
cursor Bot
pushed a commit
to jacobyoby/docassemble
that referenced
this pull request
Sep 9, 2026
- FORK.md: remove bool-config divergence (now upstream via PR jhpyle#983), add #15/#18/#19/#21/geocode-lazy to carried divergences, drop labelauty from CodeQL exclusions list - TODO.md: mark PR jhpyle#983 watch as done, update version ref to 1.10.8, update bundle split note (labelauty removed upstream) - codeql-config.yml: remove labelauty path exclusion (no longer used after upstream replaced labelauty with CSS)
jacobyoby
added a commit
to jacobyoby/docassemble
that referenced
this pull request
Sep 10, 2026
) (#67) * fix to error when a Package is deleted * removed pdfminer.six verification code * avoid error if playground directory does not exist * Add accessible skip-to-main-content links * replaced labelauty with CSS; updated screenshots; added comments; added example of acknowledging deletion of item in list; changed aria settings of div containing flash messages so that messages are announced; always add enclosing div for flash messages to the interview DOM; fix issue with session id not being set in global variable immediately after a new_session * umask 002 for background tasks; modified bundle.sh so that the concatenation happens in the bash script, not on the server -- this cuts out a step; removed fieldset/legend and removed visually-hidden legends; changed HTML of terms and help for more accessible popovers; added feature for flashing messages that only screen readers can see; added screen reader message announcing that table item has been deleted; changed where role=group appears around radio/checkbox groups; change the way that focus is set after a page change so that focus lands on the daMainQuestion if there is no field to focus on; removed the bootstrap-fileinput plugin; altered the _edit_button and _delete_button methods so that the item is passed as a third argument, so that buttons can be customized according to the item; modified progressive disclosure recipe so that it uses details/summary; when a show if reveals additional information, screen readers are notified; altered the skip to main content link so that it uses JavaScript; updated TestContext so that it works with global variable and interview answer dictionary contexts; rebuilt screenshots * Bump version: 1.10.7 → 1.10.8 * feat(a11y): skip link, 404 landmark + home link, print stylesheet (#18) Skip-to-content link (WCAG 2.4.1) as the first child of <body>: in base.html targeting #damain, and separately in the interview page emitter (interview/views.py builds that page in Python, not from base.html) targeting #daquestion, so it reaches the page litigants actually use. Bootstrap's visually-hidden-focusable shows it only on focus. The 404 page gains a <main role="main"> landmark and a link home so a mistyped form URL no longer dead-ends. app.css gains @media print rules dropping the navbar, its body padding, buttons, and footer; app.min.css regenerated with clean-css. Fail-first e2e (a11y_check.sh) asserts all three absent on the stock release and present after install; wired into CI as control + pass. Verified live and browser regression 7/7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jkoq1KnMBNnfi8YQSgAAfH * docs: post-rebase cleanup for upstream 1.10.8 sync - FORK.md: remove bool-config divergence (now upstream via PR jhpyle#983), add #15/#18/#19/#21/geocode-lazy to carried divergences, drop labelauty from CodeQL exclusions list - TODO.md: mark PR jhpyle#983 watch as done, update version ref to 1.10.8, update bundle split note (labelauty removed upstream) - codeql-config.yml: remove labelauty path exclusion (no longer used after upstream replaced labelauty with CSS) * fix(a11y): escape flash message DOM text to pass CodeQL (app.js:1752) --------- Co-authored-by: Jonathan Pyle <jhpyle@gmail.com> Co-authored-by: Jack Adamson <jackadamson@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Jacob Durham <jacob@jacobrakai.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #980
When
main page title url opens in other windowis set to a YAML boolean (FalseorTrue) in the configuration, docassemble crashes with:The workaround was to quote the value as a string (
"False"), but booleans should work since YAML naturally parses unquotedFalse/Trueas booleans.Root cause
In
docassemble_base/docassemble/base/parse.py, thedefault_titleinitialization loop processesmain page *config values and calls.strip()directly on the value without converting to string first:False != ''evaluates toTrue, so the code enters the block and callsFalse.strip()→ crash.Fix
Wrap with
str()before.strip(), matching the pattern already used on lines 8441 and 8443 in the same loop for metadata values:The downstream consumer in
helpers.py:1207already compares viastr(status.title_url_opens_in_other_window) == 'False', so the string representation flows through correctly.Verified behavior
False(bool)"False"→ title opens in same window ✓True(bool)"True"→ title opens in new window ✓"False"(string, existing workaround)"False"→ same window ✓""(empty string)