[TH] Covers [Deleted]

Server error log
  • LogicException: Content type resource must define an 'entity' value
  • src/XF/App.php:2561
  • Generated by: Unknown account
  • May 11, 2019 at 1:56 AM
Stack trace
#0 src/XF/App.php(2538): XF\App->getContentTypeEntity('resource')
#1 src/addons/ThemeHouse/Covers/Cover/AbstractHandler.php(25): XF\App->findByContentType('resource', '13', Array)
#2 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(399): ThemeHouse\Covers\Cover\AbstractHandler->getContent('13')
#3 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(27): ThemeHouse\Covers\Pub\Controller\Cover->assertCover('resource', '13')
#4 src/XF/Pub/Controller/AbstractController.php(30): ThemeHouse\Covers\Pub\Controller\Cover->preDispatchController('Position', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Controller.php(123): XF\Pub\Controller\AbstractController->preDispatchType('Position', Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(320): XF\Mvc\Controller->preDispatch('Position', Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Position', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#8 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#9 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#11 src/XF.php(390): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
["url"] => string(28) "/covers/resource/13/position"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
hi @ThemeHouse

i just updated to the latest version of the addon ... and something seems to be extremely broken right now

each time i try to add a cover to a thread - i get this message:

ov7PsHp.png


which would be fine ... except the permissions are set like this:

This is controlled by the default "Submit content without approval" permission.
 
This is controlled by the default "Submit content without approval" permission.

well in that case - something's DEFINITELY broken in the latest update, because:

202106

+ not being able to delete covers even though the permissions are set as in the previous post

+ the errors users are getting while trying to upload a cover

Code:
    InvalidArgumentException: Attempted to convert NULL to integer [content_id] src/XF/Mvc/Entity/Entity.php:740

    Generated by: USERNAME May 11, 2019 at 5:08 PM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(1363): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#2 src/XF/Mvc/Entity/Entity.php(1350): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#3 src/XF/Mvc/Entity/Entity.php(1158): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#4 src/addons/ThemeHouse/Covers/Entity/Cover.php(311): XF\Mvc\Entity\Entity->save()
#5 src/XF/Mvc/Entity/Entity.php(1297): ThemeHouse\Covers\Entity\Cover->_preSave()
#6 src/addons/ThemeHouse/Covers/Service/Cover/Editor.php(113): XF\Mvc\Entity\Entity->preSave()
#7 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(94): ThemeHouse\Covers\Service\Cover\Editor->validate(NULL)
#8 src/XF/Mvc/Dispatcher.php(321): ThemeHouse\Covers\Pub\Controller\Cover->actionImage(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Image', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#10 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#11 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#13 src/XF.php(390): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}

-------------

Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:141
#0 src/XF/Mvc/Entity/Entity.php(736): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(618): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#2 src/XF/Mvc/Entity/Entity.php(1363): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#3 src/XF/Mvc/Entity/Entity.php(1350): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#4 src/XF/Mvc/Entity/Entity.php(1158): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#5 src/addons/ThemeHouse/Covers/Entity/Cover.php(311): XF\Mvc\Entity\Entity->save()
#6 src/XF/Mvc/Entity/Entity.php(1297): ThemeHouse\Covers\Entity\Cover->_preSave()
#7 src/addons/ThemeHouse/Covers/Service/Cover/Editor.php(113): XF\Mvc\Entity\Entity->preSave()
#8 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(94): ThemeHouse\Covers\Service\Cover\Editor->validate(NULL)
#9 src/XF/Mvc/Dispatcher.php(321): ThemeHouse\Covers\Pub\Controller\Cover->actionImage(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Image', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#11 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#12 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#14 src/XF.php(390): XF\App->run()
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
 
Judging from your stack trace it appears you're not running the latest version.

oh you're right, those errors were generated before i updated ... nevermind the stack trace then, sorry about that

but i do still have the problem with approvals and not being able to delete a cover (even thought the permissions indicate i should be able to) ... even on the latest version :(
 
which would be fine ... except the permissions are set like this:
Or does it respect the "Submit content without approval" permission?

I do have this, too... occasionally. I suspect that this is because they start uploading covers before their e-mail address is verified?

Edit: Sorry for that. It didn't show me the last page and thus I couldn't see this is already being handled. Although the additional info might bear some insight?
 
Server error log
  • LogicException: Content type resource must define an 'entity' value
  • src/XF/App.php:2561
  • Generated by: Unknown account
  • May 11, 2019 at 1:56 AM
Stack trace
#0 src/XF/App.php(2538): XF\App->getContentTypeEntity('resource')
#1 src/addons/ThemeHouse/Covers/Cover/AbstractHandler.php(25): XF\App->findByContentType('resource', '13', Array)
#2 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(399): ThemeHouse\Covers\Cover\AbstractHandler->getContent('13')
#3 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(27): ThemeHouse\Covers\Pub\Controller\Cover->assertCover('resource', '13')
#4 src/XF/Pub/Controller/AbstractController.php(30): ThemeHouse\Covers\Pub\Controller\Cover->preDispatchController('Position', Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Controller.php(123): XF\Pub\Controller\AbstractController->preDispatchType('Position', Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(320): XF\Mvc\Controller->preDispatch('Position', Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Position', Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#8 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#9 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#11 src/XF.php(390): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
["url"] => string(28) "/covers/resource/13/position"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Have you disabled the resource manager? Looks like somebody tried to access a cover URL for a resource cover after the resource manager has been disabled/removed or was in the process of being updated.

I do have this, too... occasionally. I suspect that this is because they start uploading covers before their e-mail address is verified?

Edit: Sorry for that. It didn't show me the last page and thus I couldn't see this is already being handled. Although the additional info might bear some insight?
and nope ... same thing - still "awaiting approval", still can't delete

I've found (and fixed) an issue that would wrongly queue covers for the approval queue, but I don't experience any issue (or see any source for an issue) when deleting covers awaiting approval. Can you open a ticket with us and provide us with login credentials so we can take a look at your site directly?
 
Have you disabled the resource manager? Looks like somebody tried to access a cover URL for a resource cover after the resource manager has been disabled/removed or was in the process of being updated.




I've found (and fixed) an issue that would wrongly queue covers for the approval queue, but I don't experience any issue (or see any source for an issue) when deleting covers awaiting approval. Can you open a ticket with us and provide us with login credentials so we can take a look at your site directly?
I had the resources installed but never used. Literally JUST an installation and wasn't accessible to anyone but yes it is disabled for the time being as it was never in use. So this does not make much sense!
 
I had the resources installed but never used. Literally JUST an installation and wasn't accessible to anyone but yes it is disabled for the time being as it was never in use. So this does not make much sense!
The cover that throws the error was made on a resource. If the resource manager is currently disabled, then somebody who tried to manually access the cover in question produced that error. It's not a bug in the product either way. You should be able to delete the cover in the ACP cover browser to avoid future errors.
 
The cover that throws the error was made on a resource. If the resource manager is currently disabled, then somebody who tried to manually access the cover in question produced that error. It's not a bug in the product either way. You should be able to delete the cover in the ACP cover browser to avoid future errors.

I had the resources installed but NEVER used.

If it was never used how does it have a cover photo?

Edit: Also to clarify, the add-on is not disabled. It was fully uninstalled and has been for some time now. I only started getting those errors since the update.
 
If it was never used how does it have a cover photo?

Edit: Also to clarify, the add-on is not disabled. It was fully uninstalled and has been for some time now. I only started getting those errors since the update.
If it was never used how does it have a cover photo?

Edit: Also to clarify, the add-on is not disabled. It was fully uninstalled and has been for some time now. I only started getting those errors since the update.

I'm not sure what else you want me to tell you. There's a cover that has been applied to a resource. You can delete it in the ACP cover browser most likely. I can't tell you how it got there, all I can tell you is that it is there, and that it is, what is causing the error.
 
I'm not sure what else you want me to tell you. There's a cover that has been applied to a resource. You can delete it in the ACP cover browser most likely. I can't tell you how it got there, all I can tell you is that it is there, and that it is, what is causing the error.
There isn't any covers in the cover browser under content type resource, I just checked. It's not going to magically appear there is it now? It would have got there if I had EVER used resources add-on which I have been telling you I haven't. I've also told you this only really started appearing after the recent update.
 
Wow, I just noticed today that since the recent update, all user permissions have been reset!

Probably makes sense why I have been getting that error but don't know why it's relating to resource because I never used that add-on. Anyway, only time will tell if I get the same error again.
 
Last edited:
Top Bottom