How to display source file for conflicting fields types?
See original GitHub issueHi,
When building my site containing a lot of .md
files full of frontmatter, I get warnings about conflicting field types. This is a valuable information, but it’s missing one thing: which files are conflicting.
I’ve seen this conversation here where you can see screenshots with the path to the source file.
But for me source
is not showing up.
MarkdownRemark.frontmatter.mepheader.provenance.prov_number:
- type: object
value: { anote: [Object] }
- type: string
value: 'p. 264'
MarkdownRemark.frontmatter.head:
- type: object
value: { dateline: 'sans date', persname: [Object], object: 'Dessin de M. Isabey de la manufacture des frères Sevennes à Rouen.' }
- type: string
value: '[1133]'
Digging a little where the message is actually prompted, I’ve found that the source line is displayed only if the node has a description:
report.log(
`${this.selector}:${sortedByTypeName
.map(
([typeName, { value, description }]) =>
`\n - type: ${typeName}\n value: ${formatValue(
value
)}${description && `\n source: ${description}`}` // <-- Here
)
.join(``)}`
)
I’ve quickly looked around but didn’t find what is this description. On the node interface documentation page no sign of it.
I think adding this description is not the way to go, but I’m missing leads.
Any suggestion how to proceed?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Identify indexes with conflicting field types · Issue #7661 - GitHub
To save space I wonder if it would be better to display a list of indices for each field type (so essentially the...
Read more >Kibana: How to solve mapping conflict - Dev - Petr Sobeslavsky
See the source of the problem. As the message says, the problem is that a field has different type in different indices in...
Read more >Field name conflicts - Informatica Documentation
The Mapping Designer generates a field name conflict error when you validate a mapping that has fields with matching names from different transformations....
Read more >How i can resolve conflict type AcfLink - reactjs - Stack Overflow
Show activity on this post. You can alias both fields with: button { newName1: url newName2: title }. After that, you will need...
Read more >NetSuite Applications Suite - Resolving Conflicting Objects
Resolving Conflicting Objects. When you install a customization bundle, the objects in the bundle are checked against preexisting custom objects in your ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@henricazottes You are right about
first
- it is a node id that you can use to find a root ancestor node. I guess the best advice I can give is to try to restore this lineThe implementation of this function still exists here but it is not easily accessible from type conflict reporter anymore. I suspect it was the main reason for the change.
So you will probably have to re-implement it using node store directly. I would suggest putting this new implementation in the utils folder for now as a standalone utility function.
You’re right, I’ll wait for his answer before investigating more