Title: Unspecific error when importing Format.ps1xml: A node is missing from TableControl, ListControl, WideControl, CustomControl · Issue #6788 · PowerShell/PowerShell · GitHub
Open Graph Title: Unspecific error when importing Format.ps1xml: A node is missing from TableControl, ListControl, WideControl, CustomControl · Issue #6788 · PowerShell/PowerShell
X Title: Unspecific error when importing Format.ps1xml: A node is missing from TableControl, ListControl, WideControl, CustomControl · Issue #6788 · PowerShell/PowerShell
Description: When I am trying to import my Format.ps1xml file, I get a very unspecific errors message. I am coming here because I couldn't figure out what is wrong about this file after reading the XML reference extensively, asking a question on Stac...
Open Graph Description: When I am trying to import my Format.ps1xml file, I get a very unspecific errors message. I am coming here because I couldn't figure out what is wrong about this file after reading the XML referenc...
X Description: When I am trying to import my Format.ps1xml file, I get a very unspecific errors message. I am coming here because I couldn't figure out what is wrong about this file after reading the XML refe...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6788
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unspecific error when importing Format.ps1xml: A node is missing from TableControl, ListControl, WideControl, CustomControl","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\n- Windows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://github.com/PowerShell/PowerShell/blob/master/docs/KNOWNISSUES.md).\r\n- Fill out the following repro template:\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n-->\r\n\r\nWhen I am trying to import my Format.ps1xml file, I get a very unspecific errors message. I am coming here because I couldn't figure out what is wrong about this file after reading the XML reference extensively, asking a [question on StackOverflow](https://stackoverflow.com/questions/50095027/whats-wrong-about-this-format-ps1xml-file-a-node-is-missing-from-tablecontrol/50096396#50096396) and Gitter, and even digging through the PowerShell source code to find out where it is thrown.\r\n\r\nI assume this is not a bug, so it would be great if the error had a more helpful error message. An XSD schema would also help.\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```xml\r\n\u003c?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n\u003cConfiguration>\r\n \u003cViewDefinitions>\r\n \u003cView>\r\n \u003cName>MyType\u003c/Name>\r\n \u003cViewSelectedBy>\r\n \u003cTypeName>MyTypeName1\u003c/TypeName>\r\n \u003cTypeName>MyTypeName2\u003c/TypeName>\r\n \u003c/ViewSelectedBy>\r\n \u003cListControl>\r\n \u003cListEntries>\r\n \u003cListEntry>\r\n \u003cEntrySelectedBy>\r\n \u003cTypeName>MyTypeName1\u003c/TypeName>\r\n \u003c/EntrySelectedBy>\r\n \u003cListItems>\r\n \u003cListItem>\r\n \u003cPropertyName>myProp1\u003c/PropertyName>\r\n \u003c/ListItem>\r\n \u003c/ListItems>\r\n \u003c/ListEntry>\r\n \u003cListEntry>\r\n \u003cEntrySelectedBy>\r\n \u003cTypeName>MyTypeName2\u003c/TypeName>\r\n \u003c/EntrySelectedBy>\r\n \u003cListItems>\r\n \u003cListItem>\r\n \u003cPropertyName>myProp2\u003c/PropertyName>\r\n \u003c/ListItem>\r\n \u003c/ListItems>\r\n \u003c/ListEntry>\r\n \u003c/ListEntries>\r\n \u003c/ListControl>\r\n \u003c/View>\r\n \u003c/ViewDefinitions>\r\n\u003c/Configuration>\r\n```\r\n```powershell\r\nUpdate-FormatData test.Format.ps1xml\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nThis should load without error, and make `MyTypeName1` and `MyTypeName2` display as a list, with `myProp1` being shown for `MyTypeName1` and `myProp2` being shown for `MyTypeName2`.\r\n\r\nActual behavior\r\n---------------\r\n\r\nThis error:\r\n\r\n```\r\nUpdate-FormatData : Errors occurred while loading the format data file:\r\ntest.Format.ps1xml, Error at XPath /Configuration/ViewDefinitions/View[1] in file test.Format.ps1xml: A node is missing from TableControl, ListControl, WideControl, CustomControl.\r\nAt line:1 char:1\r\n+ Update-FormatData ./PSSourcegraph.Format.ps1xml\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo : InvalidOperation: (:) [Update-FormatData], RuntimeException\r\n+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.UpdateFormatDataCommand\r\n```\r\n\r\nI don't see what node is missing.\r\nWeirdly, if I remove `EntrySelectedBy`, the error doesn't occur - but I need it to switch between the types, and I don't see what else I am missing from the [documentation](https://msdn.microsoft.com/en-us/library/gg580904(v=vs.85).aspx).\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\n\r\nName Value\r\n---- -----\r\nPSVersion 6.0.1\r\nPSEdition Core\r\nGitCommitId v6.0.1\r\nOS Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/felixfbecker","@type":"Person","name":"felixfbecker"},"datePublished":"2018-05-01T18:33:32Z","url":"https://github.com/PowerShell/PowerShell/issues/6788"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ca327008-f51e-6c55-659d-b324ac918ed8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9624:115241:143BDF:1BE72F:6AFD5E0B |
| html-safe-nonce | df1810d307558e7303835192ca75e8ade546d4c6c0633565c250d7df82c88b4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjI0OjExNTI0MToxNDNCREY6MUJFNzJGOjZBRkQ1RTBCIiwidmlzaXRvcl9pZCI6Ijc3OTY4MDM2Mzc3NDAzOTYwNDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 74f719050b6c3f4b51d7591244c6585315db84b222ff01e75b02814370fa5658 |
| hovercard-subject-tag | issue:319283815 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6788/issue_layout |
| twitter:image | https://opengraph.githubassets.com/866002d76debd2ebde1efb686386f764945d98be323082f378d54e32869de01c/PowerShell/PowerShell/issues/6788 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/866002d76debd2ebde1efb686386f764945d98be323082f378d54e32869de01c/PowerShell/PowerShell/issues/6788 |
| og:image:alt | When I am trying to import my Format.ps1xml file, I get a very unspecific errors message. I am coming here because I couldn't figure out what is wrong about this file after reading the XML referenc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | felixfbecker |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width