1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Force Style On Thread Prefix 1.0.2

Extra thread prefix option to override the style on a thread based on the thread prefix

  1. Chris D

    Chris D XenForo Developer Staff Member

    ArnyVee and Shelley like this.
  2. Mutt

    Mutt Well-Known Member

    this looks very cool
    Chris D likes this.
  3. ArnyVee

    ArnyVee Well-Known Member

    Very cool Chris! I'm going to look into this at a later date as I have some ideas for this :)

    Thanks for allowing it to be shared Luxus! :D
  4. Luxus

    Luxus Well-Known Member

    I have possibly found a bug in this addon. Although it could be related to Widget Framework.
    Undefined property: XenForo_ControllerResponse_Redirect::$params
        XenForo_Application::handlePhpError() in ForceStyleOnPrefix/ControllerPublic/Thread.php at line 9
        ForceStyleOnPrefix_ControllerPublic_Thread->actionIndex() in XenForo/FrontController.php at line 310
        XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
        XenForo_FrontController->run() in C:/Winginx/home/xen/index.php at line 13
    This error occured as follows:

    I have the recent threads widget of widget framework. It shows recent X threads. One of the threads has a prefix. I moved this thread to a forum with no prefixes. Thread has been moved successfully and of course the prefix disappeared. But now the thread is displayed twice in the recent threads widget. The first is the thread from the original location and the second is the thread moved to a different location. The second link works with no issues. The first however brings me to the above error message. If I disable the Force Style on Prefix addon, the first link works. I enable it and again the error message above occurs if I click the first link.

    So actually there are two issues. Duplicated threads in the recent thread widget if a thread is moved and the above error message. I have forwarded xfrocks to this post for the duplicated thread issue.

    Edit: oops, I missed a line from the error message. Have added it now.
  5. Chris D

    Chris D XenForo Developer Staff Member

    Yeah, the duplicated thread issue occurs when a redirect is created. Redirects are created as new threads with their own thread ID so the recent threads block shouldn't pull these. It's either that or the widget cache. I'm sure xfrocks will fix this up.

    I will do some testing with regards to this add-on and thread redirects, though.
    Luxus likes this.
  6. Chris D

    Chris D XenForo Developer Staff Member

  7. Luxus

    Luxus Well-Known Member

    I accidently deleted my text I was going to post :mad:
    Anyway, thanks for the explanation. The update solves this issue. Many thanks (y)
    Chris D likes this.
  8. DRE

    DRE Well-Known Member

    Addon Installer Error. Does it have something to do with my new host?

    Server Error

    Unknown error within ZIP Archive
    1. Zend_Filter_Compress_Zip->decompress() in Zend/Filter/Decompress.php at line 47
    2. Zend_Filter_Decompress->filter() in AddOnInstaller/Model/AddOn.php at line 29
    3. AddOnInstaller_Model_AddOn->extractZip() in AddOnInstaller/ControllerAdmin/AddOn.php at line 57
    4. AddOnInstaller_ControllerAdmin_AddOn->actionInstallUpgrade() in XenForo/FrontController.php at line 310
    5. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    6. XenForo_FrontController->run() in /var/www/vhosts/user/httpdocs/admin.php at line 13
  9. Chris D

    Chris D XenForo Developer Staff Member

    You would have to ask your new host!
    RoldanLT and DRE like this.
  10. MirrorMan

    MirrorMan Member

    I think I have found another bug while playing with a few ideas.

    To quote your overview:
    While this is true, the Node's override style is ignored even if the Thread Prefix does not have an override style selected. This means that the member will see the thread in whichever style they have selected instead of the style we want them to see in that particular Node. Any threads without prefixes are displayed with the Node's override style so that's not the issue. It appears that adding a prefix switches off the Node's override style without checking whether the prefix will force one or not.

    If I switch off the add-on everything works as expected.
    Luxus likes this.
  11. Chris D

    Chris D XenForo Developer Staff Member

  12. MirrorMan

    MirrorMan Member

    That's fixed it :)

    Thanks for such a quick update!
    Chris D likes this.

Share This Page