Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Only one section allowed for replacement #17

Open
wcatron opened this issue Oct 10, 2016 · 2 comments
Open

Error: Only one section allowed for replacement #17

wcatron opened this issue Oct 10, 2016 · 2 comments

Comments

@wcatron
Copy link

wcatron commented Oct 10, 2016

When calling editDocument with operation REPLACE_SECTION I get this error consistently. I'm only trying to replace one section, however I want to replace all the content within that section. Is this not the expected use case? Can I change the contents of an entire section without deleting and a new one in the same place in the document? Perhaps this is a by-product of the issue but I have a lot of orphaned sections when I inspect the document.

{ 
  "threadId": "WabAAARi2ls",
  "operation": 4,
  "sectionId": "WabACApQqhG",
  "content": "'<li>List item A</li><li>List item B</li><li>List item C</li><li>List item D</li><li>List Item E</li>' 
}
@wcatron wcatron changed the title Only one section allowed for replacement Error: Only one section allowed for replacement Oct 10, 2016
@bthomas-Palantir
Copy link

Each list item gets its own section_id on creation, hence the error; the operation can only deal with a single section at a time. This is a bummer, because I'd like to replace all the content under a certain heading, but that's not what "section" means in Quip.

@unsupo
Copy link

unsupo commented Jan 16, 2020

Same issue when editing a table.
You'd think a whole table is a section, but turns out each row is a section.

Not sure is this is a viable solution, but maybe delete the thread and recreate it with the content you want.
Or run multiple requests to update all rows or list items in your case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants