[TH] Covers [Deleted]

@ThemeHouse, I think this simple feature is very important:
I think it is important to have an ability to set different rights for profile/resource/thread covers separately. In my case I want to prohibit loading custom cover image for profiles/threads but allow custom cover images for resources.
All the rest is super cool. Can you at least say will it be implemented (if will, ~when). I can help with making the patch also)
 
Last edited:
I just bought this add-on, loving it so far! few questions!

1) Can we edit the size the covers need to be? I feel 1000px height is too big then the image doesn't get displayed quite right for the cover......
2) How does one make preset covers? I can't find it?
 
@ThemeHouse, I think this simple feature is very important:

All the rest is super cool. Can you at least say will it be implemented (if will, ~when). I can help with making the patch also)
This has been added a feature suggestion in our issue tracker.
1) Can we edit the size the covers need to be? I feel 1000px height is too big then the image doesn't get displayed quite right for the cover......
This is something we are planning on offering in the next update! :)
2) How does one make preset covers? I can't find it?
This can be found in [TH] Covers 2's documentation here.
 
I think it would be great to use thread/resource/user cover image as OpenGraph protocol image or have a setting checkbox to enable this.
 
Got this error:

Code:
Server error log
InvalidArgumentException: Attempted to convert NULL to integer [content_id] src/XF/Mvc/Entity/Entity.php:688
Generated by: UnKnown-Self Aug 21, 2018 at 9:55 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#2 src/XF/Mvc/Entity/Entity.php(1287): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#3 src/XF/Mvc/Entity/Entity.php(1095): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#4 src/addons/ThemeHouse/Covers/Entity/Cover.php(367): XF\Mvc\Entity\Entity->save()
#5 src/XF/Mvc/Entity/Entity.php(1234): ThemeHouse\Covers\Entity\Cover->_preSave()
#6 src/XF/Mvc/FormAction.php(51): XF\Mvc\Entity\Entity->preSave()
#7 src/XF/Mvc/FormAction.php(140): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(156): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Pub\Controller\Cover->actionStyle(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Style', 'json', Object(XF\Mvc\ParameterBag), '', Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}

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

Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:115
#0 src/XF/Mvc/Entity/Entity.php(684): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#2 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#3 src/XF/Mvc/Entity/Entity.php(1287): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#4 src/XF/Mvc/Entity/Entity.php(1095): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#5 src/addons/ThemeHouse/Covers/Entity/Cover.php(367): XF\Mvc\Entity\Entity->save()
#6 src/XF/Mvc/Entity/Entity.php(1234): ThemeHouse\Covers\Entity\Cover->_preSave()
#7 src/XF/Mvc/FormAction.php(51): XF\Mvc\Entity\Entity->preSave()
#8 src/XF/Mvc/FormAction.php(140): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#9 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(156): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Pub\Controller\Cover->actionStyle(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Style', 'json', Object(XF\Mvc\ParameterBag), '', Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 index.php(13): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(24) "/covers/user/31549/style"
  ["referrer"] => string(50) "https://www.myptsd.com/members/unknown-self.31549/"
  ["_GET"] => array(1) {
    ["/covers/user/31549/style"] => string(0) ""
  }
  ["_POST"] => array(5) {
    ["background_color"] => string(0) ""
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(28) "/members/unknown-self.31549/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I think it would be great to use thread/resource/user cover image as OpenGraph protocol image or have a setting checkbox to enable this.
I'll consult with one of our developers on this suggestion and add it to our issue tracker soon! :)
Got this error:

Code:
Server error log
InvalidArgumentException: Attempted to convert NULL to integer [content_id] src/XF/Mvc/Entity/Entity.php:688
Generated by: UnKnown-Self Aug 21, 2018 at 9:55 AM
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#2 src/XF/Mvc/Entity/Entity.php(1287): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#3 src/XF/Mvc/Entity/Entity.php(1095): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#4 src/addons/ThemeHouse/Covers/Entity/Cover.php(367): XF\Mvc\Entity\Entity->save()
#5 src/XF/Mvc/Entity/Entity.php(1234): ThemeHouse\Covers\Entity\Cover->_preSave()
#6 src/XF/Mvc/FormAction.php(51): XF\Mvc\Entity\Entity->preSave()
#7 src/XF/Mvc/FormAction.php(140): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#8 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(156): XF\Mvc\FormAction->run()
#9 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Pub\Controller\Cover->actionStyle(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Style', 'json', Object(XF\Mvc\ParameterBag), '', Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}

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

Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:115
#0 src/XF/Mvc/Entity/Entity.php(684): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#2 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#3 src/XF/Mvc/Entity/Entity.php(1287): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#4 src/XF/Mvc/Entity/Entity.php(1095): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#5 src/addons/ThemeHouse/Covers/Entity/Cover.php(367): XF\Mvc\Entity\Entity->save()
#6 src/XF/Mvc/Entity/Entity.php(1234): ThemeHouse\Covers\Entity\Cover->_preSave()
#7 src/XF/Mvc/FormAction.php(51): XF\Mvc\Entity\Entity->preSave()
#8 src/XF/Mvc/FormAction.php(140): XF\Mvc\FormAction->XF\Mvc\{closure}(Object(XF\Mvc\FormAction))
#9 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(156): XF\Mvc\FormAction->run()
#10 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Pub\Controller\Cover->actionStyle(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Style', 'json', Object(XF\Mvc\ParameterBag), '', Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 index.php(13): XF::runApp('XF\\Pub\\App')
#16 {main}
Request state
array(4) {
  ["url"] => string(24) "/covers/user/31549/style"
  ["referrer"] => string(50) "https://www.myptsd.com/members/unknown-self.31549/"
  ["_GET"] => array(1) {
    ["/covers/user/31549/style"] => string(0) ""
  }
  ["_POST"] => array(5) {
    ["background_color"] => string(0) ""
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(28) "/members/unknown-self.31549/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
Not sure what could have caused this, go ahead and create a ticket on our support portal so we can get a closer look! :)
 
Hi @ThemeHouse

i'm getting this error when i try to view the cover list:

Code:
    InvalidArgumentException: Content must be an entity or an ID of a valid entity src/XF/ModeratorLog/Logger.php:135

    Generated by: metadmin Sep 21, 2018 at 12:15 PM

Stack trace

#0 src/XF/Logger.php(37): XF\ModeratorLog\Logger->log('cover', NULL, 'deleted', Array, true)
#1 src/addons/ThemeHouse/Covers/Entity/Cover.php(395): XF\Logger->logModeratorAction('cover', NULL, 'deleted')
#2 src/XF/Mvc/Entity/Entity.php(1561): ThemeHouse\Covers\Entity\Cover->_preDelete()
#3 src/XF/Mvc/Entity/Entity.php(1477): XF\Mvc\Entity\Entity->preDelete()
#4 src/addons/ThemeHouse/Covers/Admin/Controller/Cover.php(71): XF\Mvc\Entity\Entity->delete()
#5 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Admin\Controller\Cover->actionIndex(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Index', 'html', Object(XF\Mvc\ParameterBag), 'coverlist', Object(ThemeHouse\Covers\Admin\Controller\Cover), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#9 src/XF.php(329): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}

Request state

array(4) {
  ["url"] => string(18) "/admin.php?covers/"
  ["referrer"] => string(50) "https://www.metacouncil.com/admin.php?attachments/"
  ["_GET"] => array(1) {
    ["covers/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

any idea what might be going on?

thanks in advance for the reply :)
 
Hi @ThemeHouse

i'm getting this error when i try to view the cover list:

Code:
    InvalidArgumentException: Content must be an entity or an ID of a valid entity src/XF/ModeratorLog/Logger.php:135

    Generated by: metadmin Sep 21, 2018 at 12:15 PM

Stack trace

#0 src/XF/Logger.php(37): XF\ModeratorLog\Logger->log('cover', NULL, 'deleted', Array, true)
#1 src/addons/ThemeHouse/Covers/Entity/Cover.php(395): XF\Logger->logModeratorAction('cover', NULL, 'deleted')
#2 src/XF/Mvc/Entity/Entity.php(1561): ThemeHouse\Covers\Entity\Cover->_preDelete()
#3 src/XF/Mvc/Entity/Entity.php(1477): XF\Mvc\Entity\Entity->preDelete()
#4 src/addons/ThemeHouse/Covers/Admin/Controller/Cover.php(71): XF\Mvc\Entity\Entity->delete()
#5 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Admin\Controller\Cover->actionIndex(Object(XF\Mvc\ParameterBag))
#6 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Index', 'html', Object(XF\Mvc\ParameterBag), 'coverlist', Object(ThemeHouse\Covers\Admin\Controller\Cover), NULL)
#7 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#9 src/XF.php(329): XF\App->run()
#10 admin.php(13): XF::runApp('XF\\Admin\\App')
#11 {main}

Request state

array(4) {
  ["url"] => string(18) "/admin.php?covers/"
  ["referrer"] => string(50) "https://www.metacouncil.com/admin.php?attachments/"
  ["_GET"] => array(1) {
    ["covers/"] => string(0) ""
  }
  ["_POST"] => array(0) {
  }
}

any idea what might be going on?

thanks in advance for the reply :)
Go ahead and create a ticket on our support portal so we can take a closer look into this! :)
 
Hello,
When selecting "none" as cover preset only in Thread (ok in Profile), system returns this error :

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

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#2 src/XF/Mvc/Entity/Entity.php(1287): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#3 src/XF/Mvc/Entity/Entity.php(1095): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#4 src/addons/ThemeHouse/Covers/Entity/Cover.php(367): XF\Mvc\Entity\Entity->save()
#5 src/XF/Mvc/Entity/Entity.php(1234): ThemeHouse\Covers\Entity\Cover->_preSave()
#6 src/XF/Mvc/Entity/Entity.php(1087): XF\Mvc\Entity\Entity->preSave()
#7 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(322): XF\Mvc\Entity\Entity->save()
#8 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Pub\Controller\Cover->actionPreset(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Preset', 'html', Object(XF\Mvc\ParameterBag), '', Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#10 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#12 src/XF.php(328): XF\App->run()
#13 index.php(13): XF::runApp('XF\\Pub\\App')
#14 {main}

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

Previous InvalidArgumentException: Attempted to convert NULL to integer - src/XF/Mvc/Entity/ValueFormatter.php:115
#0 src/XF/Mvc/Entity/Entity.php(684): XF\Mvc\Entity\ValueFormatter->castValueToType(NULL, 2, Array)
#1 src/XF/Mvc/Entity/Entity.php(575): XF\Mvc\Entity\Entity->_castValueToType(NULL, 'content_id', 2, Array)
#2 src/XF/Mvc/Entity/Entity.php(1300): XF\Mvc\Entity\Entity->set('content_id', NULL, Array)
#3 src/XF/Mvc/Entity/Entity.php(1287): XF\Mvc\Entity\Entity->_resolveDeferredValue('content_id', Object(XF\Mvc\Entity\DeferredValue), 'save')
#4 src/XF/Mvc/Entity/Entity.php(1095): XF\Mvc\Entity\Entity->_fillDeferredValues('save')
#5 src/addons/ThemeHouse/Covers/Entity/Cover.php(367): XF\Mvc\Entity\Entity->save()
#6 src/XF/Mvc/Entity/Entity.php(1234): ThemeHouse\Covers\Entity\Cover->_preSave()
#7 src/XF/Mvc/Entity/Entity.php(1087): XF\Mvc\Entity\Entity->preSave()
#8 src/addons/ThemeHouse/Covers/Pub/Controller/Cover.php(322): XF\Mvc\Entity\Entity->save()
#9 src/XF/Mvc/Dispatcher.php(249): ThemeHouse\Covers\Pub\Controller\Cover->actionPreset(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('ThemeHouse\\Cove...', 'Preset', 'html', Object(XF\Mvc\ParameterBag), '', Object(ThemeHouse\Covers\Pub\Controller\Cover), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}

Demand state

array(4) {
["url"] => string(100) "/forums/covers/thread/16760/preset?cover_preset_id=0&t=1539027010%2C8df622519c1030185b95ddfce52d2e02"
["referrer"] => string(82) "https://www.forum-des-portables-asus.fr/forums/threads/bouton-power-x93s-hs.16760/"
["_GET"] => array(2) {
["cover_preset_id"] => string(1) "0"
["t"] => string(43) "1539027010,8df622519c1030185b95ddfce52d2e02"
}
["_POST"] => array(0) {
}
}
 
Last edited:
May i suggest some features :
- option to set cover per forum category in preset criteria
- option to set cover per resources category in preset criteria.
 
Hello,
When selecting "none" as cover preset only in Thread (ok in Profile), system returns this error :
May i suggest some features :
- option to set cover per forum category in preset criteria
- option to set cover per resources category in preset criteria.
I'll review the suggested features, also the error your getting is happening on the latest [TH] Covers version?
 
Top Bottom