qene10

Error After Last Update - XFRM

qene10Verified member

Well-Known Member

Vip Member
Reputation: 20%
InvalidArgumentException: Unknown action 'watch_no_email' (expected: delete/watch) in src/addons/XFRM/Repository/ResourceWatch.php at line 92
  1. XFRM\Repository\ResourceWatch->setWatchState() in src/addons/XV/Entity/ResourceItem.php at line 223
  2. XV\Entity\ResourceItem->setWatchResource() in src/addons/XV/Pub/Controller/ResourceVersion.php at line 186
  3. XV\Pub\Controller\ResourceVersion->getDownload() in src/addons/XV/Pub/Controller/ResourceVersion.php at line 109
  4. XV\Pub\Controller\ResourceVersion->actionDownload() in src/XF/Mvc/Dispatcher.php at line 362
  5. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 265
  6. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  7. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  8. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  9. XF\App->run() in src/XF.php at line 806
  10. XF::runApp() in index.php at line 23
 
After the last update I'm getting a lot of problems with the ‘Resources’ add-on.

1725479102909.webp


When I configure the field at the top, I get the following error.

1725479116331.webp


I urgently need your support.
 
I also urgently need support, when I share a post the image preview does not work automatically, you have to rebuild the cache every time.
 
i have been trying to solve this for hours. when i asked chatgpt he wrote the following explanations. please and urgently support us. there are tens of thousands of users on my site and the only reason they register is to ‘download resources’

This error occurs when an unexpected action name (`action`) is used in a XenForo add-on or a customized function. The root cause of the issue is that the `watch_no_email` action is being passed to the `setWatchState()` function in the `XFRM/Repository/ResourceWatch.php` file, but this function only expects `delete` and `watch` actions.

### Detailed Analysis of the Error

- **`XFRM/Repository/ResourceWatch.php at line 92`:** Here, the `setWatchState()` function does not recognize the `watch_no_email` action.
- **`XV\Entity\ResourceItem->setWatchResource()`:** This function is passing an action to `setWatchState()`, but the passed action (`watch_no_email`) is not supported.
- **`XV\Pub\Controller\ResourceVersion->actionDownload()`:** This occurs when attempting to set the watch state of a downloadable resource.

### Possible Solutions

1. **Check Add-on or Customization:**
- The `watch_no_email` action might originate from an add-on or custom function. Ensure that this action name is correct and supported by the `setWatchState()` function.

2. **Fix the Code:**
- Since the `watch_no_email` action is not recognized, you might need to either remove this action from the code or properly add it to the `setWatchState()` function.
- If `watch_no_email` is a custom action, you can add an additional condition in the `setWatchState()` function to handle this action appropriately.

3. **Use an Alternative Action:**
- If this action is unnecessary, consider replacing the `watch_no_email` action with a recognized action like `watch` or `delete`.

### Summary

To resolve this error, you'll need to investigate the source and purpose of the `watch_no_email` action. Replacing it with a recognized action or modifying the code to support this action could solve the problem. If this action is coming from an add-on or a customization, reviewing the relevant code is essential.
 
i have been trying to solve this for hours. when i asked chatgpt he wrote the following explanations. please and urgently support us. there are tens of thousands of users on my site and the only reason they register is to ‘download resources’
ehh... bro honestly i don't know, wait for xenvn to come back. XENVN only you can save us! He's coming!!
200.webp
 
When I deleted the following code fragment on line 255 in the file, the problem was fixed.

We are waiting for a permanent solution @xenvn

PHP:
You must log in to view
(1 lines)
 
InvalidArgumentException: Unknown action 'watch_no_email' (expected: delete/watch) in src/addons/XFRM/Repository/ResourceWatch.php at line 92
  1. XFRM\Repository\ResourceWatch->setWatchState() in src/addons/XV/Entity/ResourceItem.php at line 223
  2. XV\Entity\ResourceItem->setWatchResource() in src/addons/XV/Pub/Controller/ResourceVersion.php at line 186
  3. XV\Pub\Controller\ResourceVersion->getDownload() in src/addons/XV/Pub/Controller/ResourceVersion.php at line 109
  4. XV\Pub\Controller\ResourceVersion->actionDownload() in src/XF/Mvc/Dispatcher.php at line 362
  5. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 265
  6. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  7. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  8. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  9. XF\App->run() in src/XF.php at line 806
  10. XF::runApp() in index.php at line 23
Fixed, please update to the latest version.

Change:
$watchRepo->setWatchState($this, $visitor, 'watch_no_email');
To:
$watchRepo->setWatchState($this, $visitor, 'watch');
 
I also urgently need support, when I share a post the image preview does not work automatically, you have to rebuild the cache every time.
The post image will be automatically displayed after you create the post.
You can PM me a demo account of the site you are having problems with, I will check directly.
 
The post image will be automatically displayed after you create the post.
You can PM me a demo account of the site you are having problems with, I will check directly.
When you copy the post with the photos it doesn't work, when you insert the image without copying it it works.
 
Back
Top Bottom