The error message indicates that the class `
XF\Entity\XFCP_Thread` is being declared twice, which causes a conflict:
Error: Cannot declare class XF\Entity\XFCP_Thread because the name is already in use in src/XF/Extension.php at line 212
This means that somewhere in XenForo or an add-on, this class is being redefined when it is already loaded.
Possible Causes:
1.
Add-on conflict:
- Some add-ons might be overriding a XenForo class incorrectly or without the proper namespace.
- The error trace shows references to multiple add-ons, such as:
- `
SV/SearchImprovements`
- `
OzzModz/GoogleSearch`
- One of these add-ons might be causing the issue.
2.
Incorrect use of class_alias() in src/XF/Extension.php (line 212):
- `class_alias()` is used in XenForo for class extensions. If a class with the same name is already registered, this error occurs.
3.
Cache issue:
- If XenForo is using the class cache (`internal_data/code_cache`), an outdated cache may cause the class to be loaded twice.
4.
File structure issue or corrupted files:
- Check if `src/XF/Entity/Thread.php` or a related file exists twice or if there is a conflict with extensions.
Solutions:
1.
Disable add-ons and test:
- Try disabling `
SV/SearchImprovements` and `
OzzModz/GoogleSearch` to see if the error disappears.
2.
Clear XenForo cache:
- Delete all files inside `
internal_data/code_cache`
- Alternatively, clear the cache via the Admin Panel:
`
Admin Panel → Development → Clear Cache`
3.
Check PHP files:
- Open `
src/XF/Extension.php` (line 212) and look for duplicate class definitions.
- Verify `
src/XF/Entity/Thread.php` to ensure `XFCP_Thread` is not declared multiple times.
4.
Repair XenForo files:
- If XenForo has been modified, try re-uploading the original files to replace any corrupted or duplicate files.
If the issue persists, try debugging by checking the full error log and any related files.