"Page cannot be imported because of HTML content in its draft contents."

What went wrong?

The following error was encountered when attempting to import a draft page: “Page cannot be imported because of HTML content in its draft contents. Found: <user_id>. Remove all HTML content and try again.”

Did you do anything differently this time that got you to this state?

The following was present in the file.

    $ openstack user show <user_uuid> -c options

It was not the actual issue, though. The issue was a nested code block.

5. Add the token value to the database.
    1. For a single user

        mysql> update user_option set option_value = '[["password", "totp"], ["token"]]'  where user_id= '<user_id>';

Were you able to work around it?

Yes – I was able to workaround this by un-indenting the code block which was nested within a subsection of an ordered list. The nested ordered list itself doesn’t break the import – although, as this feature isn’t supported, it doesn’t necessarily get formatted correctly, but, this is outside the scope of this bug report.

Screenshots if possible.

Expected Behavior

The expected outcome, at the very least, is that the error would be more accurate in terms of the conflict. The <user_id> attribute within the code block is able to be parsed w/o issue otherwise.

Going beyond that:

  • In lieu of nested lists/blocks being supported, flattening should occur on import automatically.
  • Otherwise, ideal long-term goal would be to support nesting.

I agree with both conclusions. In fact, if we remove indentation from everywhere except code blocks, then we would have a much easier experience with imports from external sources.

We wouldn’t notify about HTML content in code blocks, or inline code, if we could parse that it’s a code block or inline code correctly.

I’ll keep you updated on this

1 Like

This issue should be resolved as we now remove all indentation except for multi-level lists.