Publish keeps throwing "File hash mismatch" error

Indeed.

ok, so after you disable the plugin, if you edit the note, does it clear the error?

which version of the plugin are you using?

Actually yes it did somehow clear the error. Iā€™m merely changing the markdown though :laughing:. Do you have any clue what may be going on between the ā€œUpdate time on editā€ and Publish? Right when I turned the plugin on, the ones that failed were in the ā€œChangedā€ section and were ones that had there ā€œupdatedā€ time changed.

As has been mentioned before, saving the file again from within a separate editor like VS code and having the ā€œUpdate time on editā€ plugin disabled also fixes it which makes me think this is related to file metadata

Edit: The plugin doesnā€™t even have to be disabled. I just saved it in VS Code and it functions as a temporary workaround.

I decided not to publish for now. Iā€™ll probably try again in a few months time, hopefully by then the issue will have been resolved.

I moved to the Linter plugin for the time being. There are issues with using Linter when it comes to moving the vault or something along those lines, but Iā€™d rather not have to autosave everything in an external IDE everytime I want to publish

I have the same problem. I canā€™t publish notes. Same error. I also had the ā€œUpdate time on editā€ plugin. Even after disabling it, the publish still doesnā€™t work and Iā€™ve got same error.
However, after I remove ā€œcreatedā€ and ā€œupdatedā€ fields from frontmatter, the error is gone and publish works. So, I assume that the Publish and this plugin uses internally the same fields.
...few moments later...
My assumption seems to be correct. When changed the name of these fields in ā€œUpdate time on editā€ plugin settings, the publish works fine even with enabled plugin.

...few moments later...
Nahā€¦ this doesnā€™t help for some reason and next tryā€¦Iā€™ve got the same error again, even with changed field names. However, deleting fields seem to help a bit.

You can save the pages in a separate editor like VS Code and the error-giving pages should Publish. I decided to go with the Linter plugin for the time being till the issue is resolved for the plugin

I use a python script to delete all the Updated and Created property. Please use it with caution and make a backup

import os

def add_properties(file_path, name_property, value_property):
    with open(file_path, 'r', encoding='utf-8') as file:
        content = file.read()

    # Check if file has a YAML header.
    if content.startswith('---'):
        # Split content into header, delimiter and the rest of the file.
        _, header, rest = content.split('---', 2)
        
        # Split header into lines.
        lines = header.split('\n')
        
        # Add the new property line at the end of the header, before the delimiter.
        lines.append(f"{name_property}: {value_property}")
        
        # Join the lines, the delimiter, and the rest of the file.
        content = '---'.join(['', '\n'.join(lines), rest])
    else:
        # No YAML header exists, so we create one with the given property and value.
        yaml_header = f"---\n{name_property}: {value_property}\n---\n"
        content = yaml_header + content

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(content)



def clean_file(file_path, delete_properties):
    with open(file_path, 'r', encoding='utf-8') as file:
        content = file.read()

    # Check if file has a YAML header.
    if content.startswith('---'):
        # Split content into header, delimiter and the rest of the file.
        _, header, rest = content.split('---', 2)

        # Split header into lines.
        lines = header.split('\n')

        # Remove line with the specified property.
        lines = [line for line in lines if not line.startswith(delete_properties + ':')]

        # Join the lines, the delimiter, and the rest of the file.
        content = '---'.join(['', '\n'.join(lines), rest])

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(content)


def list_md_files(directory):
    """Recursively list all .md files in a directory and call clean_file for each."""
    for root, dirs, files in os.walk(directory):
        for file in files:
            if file.endswith('.md'):
                file_path = os.path.join(root, file)
                clean_file(file_path, delete_properties)


# Starting directory
start_dir = './'  # You can change this to any directory path you want
delete_properties = "Updated"  # Or any other property you want to delete.
list_md_files(start_dir)

And change the delete_properties to Createdā€¦