- Views: 2K
- Replies: 7
When you run the File health check function of Xenforo 2, you may get error messages about the Unexpected contents of some files.
For example:
This error will appear when you edit files in the source code (XenForo, add-on, style,..).
To fix this, you need to update the SHA256 code of the modified file declared in the hashes.json files.
If it's Xenforo files, the SHA256 code will be declared in: src/addons/XF/hashes.json
If it is an add-on file, it will be declared in the file hashes.json located in the directory of the add-on.
Example: src/addons/NameAddon/hashes.json
XenVn add-on has a built-in feature that helps you see the SHA256 code of all files in the source code.
Go to XenVn File Manager at: domain.com/admin.php?xv/files
Browse to the file you edited, (Listed in File health check results). Example: src/XF.php
The file's SHA256 code will appear, copy that code
Open the file hashes.json (follow the instructions above), find the edited file path, you will see it has the form:
Do the same with all the files you edited and get the message Unexpected contents.
See details about XenVn add-on at:
https://xenvn.com/threads/xenvn-all-in-one-tools-for-xenforo-2.516/
For example:
This error will appear when you edit files in the source code (XenForo, add-on, style,..).
To fix this, you need to update the SHA256 code of the modified file declared in the hashes.json files.
If it's Xenforo files, the SHA256 code will be declared in: src/addons/XF/hashes.json
If it is an add-on file, it will be declared in the file hashes.json located in the directory of the add-on.
Example: src/addons/NameAddon/hashes.json
XenVn add-on has a built-in feature that helps you see the SHA256 code of all files in the source code.
Go to XenVn File Manager at: domain.com/admin.php?xv/files
Browse to the file you edited, (Listed in File health check results). Example: src/XF.php
The file's SHA256 code will appear, copy that code
Open the file hashes.json (follow the instructions above), find the edited file path, you will see it has the form:
Then replace the old SHA256 code with the new one you copied above"src/XF.php": "7cb33bbe2a0787980c3b66b85509eaaed9bfe3fa07cd4a6aa74a8da1062c9e5a"
Do the same with all the files you edited and get the message Unexpected contents.
See details about XenVn add-on at:
https://xenvn.com/threads/xenvn-all-in-one-tools-for-xenforo-2.516/
Last edited: