• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • LogicException: Content type vwattachedit must define an 'entity' value src/XF/App.php:2738

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: LogicException: Content type vwattachedit must define an 'entity' value src/XF/App.php:2738

    • Issue Tools
      • View Changes
    1. issueid=6270 November 8, 2021 11:31 AM
      wolven wolven is offline
      New Member
      LogicException: Content type vwattachedit must define an 'entity' value src/XF/App.php:2738
      Upgrade AddOn "Content Ratings" throws error

      Whilst Upgrading an addon (Content Rating) it stops with error:



      LogicException: Content type vwattachedit must define an 'entity' value src/XF/App.php:2738

      Generiert von: ... 8. November 2021 um 17:21

      Stack-Trace

      #0 src/addons/SV/ContentRatings/Job/ContentRatingData.php(50): XF\App->getContentTypeEntity('vwattachedit')
      #1 src/XF/Job/Manager.php(260): SV\ContentRatings\Job\ContentRatingData->run(7.95378)
      #2 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.95378)
      #3 src/XF/Job/Manager.php(118): XF\Job\Manager->runJobEntry(Array, 7.95378)
      #4 src/XF/Admin/Controller/Tools.php(122): XF\Job\Manager->runByIds(Array, 8)
      #5 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Tools->actionRunJob(Object(XF\Mvc\ParameterBag))
      #6 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
      #7 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Tools), NULL)
      #8 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
      #9 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
      #10 src/XF.php(512): XF\App->run()
      #11 admin.php(13): XF::runApp('XF\\Admin\\App')
      #12 {main}

      Status der Anfrage

      array(4) {
      ["url"] => string(31) "/xf2dev/admin.php?tools/run-job"
      ["referrer"] => string(54) "https://www.tt-board.eu/xf2dev/admin.php?tools/run-job"
      ["_GET"] => array(1) {
      ["tools/run-job"] => string(0) ""
      }
      ["_POST"] => array(3) {
      ["_xfRedirect"] => string(89) "https://www.tt-board.eu/xf2dev/admin.php?add-ons/install-from-archive-complete&batch_id=8"
      ["_xfToken"] => string(8) "********"
      ["only_ids"] => string(144) "3050,3051,3052,3053,3054,3055,3056,3057,3058,3059,3060,3 061,3062,3063,3064,3065,3066,3067,3068,3069,3070,3071,307 2,3073,3074,3075,3076,3077,3078"
      }
      }
    Issue Details
    Issue Number 6270
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Install / Upgrade
    Status Not a Bug
    Priority 4 - Warnings / Script Errors
    Affected Version 4.1.1
    Fixed Version (none)
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 8, 2021 12:45 PM
      pegasus pegasus is offline
      VaultWiki Team
      Why is the add-on Content Ratings trying to apply ratings to another add-on's content-type when that content-type doesn't have a rating handler class? Unless it has a rating handler class, having a rating for a vwattachedit doesn't make much sense in a generic ratings sense, just based on what that content-type actually refers to.

      In general VaultWiki, does not provide "entity" values except in rare circumstances, because the content-type data must be retrieved in a specific way, especially for history-based content types. Again, that's why we implement handler classes for each content-type, where we implement a function, such as reactions, tags, etc.

      TLDR; If Content Ratings is going to magically handle content-types without those content-types having a "Content Ratings" handler class, and it is assuming that various other content-type fields exist, like it assumes "entity" exists, it can avoid errors like this by checking if all those values exist for the content-type, before trying to implement its rating system on those content-types. This is a bug in the Content Ratings add-on.

      VaultWiki provides its own rating system with a special handler for history-related content-types. It is unlikely another add-on would apply its own ratings in anywhere near an expected manner (history ratings are weighted over time, against other history types, consider various flags, and contribute to the overall page rating).
      Reply Reply  
    2. November 9, 2021 8:46 AM
      wolven wolven is offline
      New Member
      Thanks, folks,

      I adressed this to the Content Rating developers and wait for their response,
      Reply Reply  
    3. November 10, 2021 7:56 AM
      wolven wolven is offline
      New Member
      Content Rating developer reacted and has build a test into his addon for checking.
      But he states as follows:

      "When rebuilding reactions, Content Rating add-on fetches all like_handler_class or reaction_handler_class handlers and assumes the add-ons are correctly coded to have a linked entity as these handlers functionally require it.

      Implementing various *_handler_class entries without a similar entity class entry is bad practice and will cause issues with various other add-ons."


      You might take this into consideration.
      Thanks.
      Reply Reply  
    4. November 10, 2021 10:45 AM
      pegasus pegasus is offline
      VaultWiki Team
      Thanks, point taken. We will consider improving this in the future, but it seems that the Content Rating author is also overlooking an important element: implementing a *_handler_class allows add-ons to override that handler's ::getContent method. If an add-on is fetching content based on like_handler_class or reaction_handler_class, it should do so via that class's actual getContent method, rather than assuming that the class uses the default method from the abstract class. This is best practice and will help ensure compatibility with the greatest number of add-ons.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:54 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.