[TaylorJ] Blogs

[TaylorJ] Blogs 1.7.4

No permission to download
That I am not entirely sure about, I've never used cloud or installed addons on a cloud instance. Do let me know what comes of the ticket though so I can better help others in the future if this happens.

OK, thanks. I've installed almost all of the upgrades along the way without issue. Just an FYI.
 

Template errors​

  • Template public:svDailyStatistics_widget_forum_statistics: [E_USER_WARNING] Method getExtendedStatistics is not callable on the given object (XF\Repository\CountersRepository) (src/XF/Template/Templater.php:1295)
  • Template :: [E_USER_WARNING] Method canViewBlogs is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
  • Template public:PAGE_CONTAINER: [E_USER_WARNING] Method canViewReports is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
  • Template public:PAGE_CONTAINER: [E_USER_WARNING] Method canViewReports is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
  • Template public:lau_staff_bar: [E_USER_WARNING] Method canUseLau is not callable on the given object (XF\Entity\User) (src/XF/Template/Templater.php:1295)
Would you please post a full stack trace for this, or if only showing up on the frontend can you explain where you are seeing this, what are you doing at the time when seeing this?
 
"Although the title length has been set to 500, it does not actually take effect."
This is set to a hard limit of 300, no matter what is chosen, until I figure out a better way of making it unlimited/unlimited at admin control. Have made progress on that though so should be in the next x.X.x release.
 
tried 1.7.2 - still having the same crash as before. falling back to 1.6.1 as the last "safe" version

Fatal Error: Declaration of ThemeHouse\Donate\XF\Entity\User::getStructure(XF\Mvc\Entity\Structure $structure) must be compatible with TaylorJ\Blogs\XF\Entity\User::getStructure(XF\Mvc\Entity\Structure $structure): XF\Mvc\Entity\Structure

realising this is the same error as well, meaning it isn't just a ThemeHouse thing
Fatal error: Declaration of SV\UserMentionsImprovements\XF\Entity\User::getStructure(XF\Mvc\Entity\Structure $structure) must be compatible with TaylorJ\Blogs\XF\Entity\User::getStructure(XF\Mvc\Entity\Structure $structure): XF\Mvc\Entity\Structure
 
tried 1.7.2 - still having the same crash as before. falling back to 1.6.1 as the last "safe" version

Fatal Error: Declaration of ThemeHouse\Donate\XF\Entity\User::getStructure(XF\Mvc\Entity\Structure $structure) must be compatible with TaylorJ\Blogs\XF\Entity\User::getStructure(XF\Mvc\Entity\Structure $structure): XF\Mvc\Entity\Structure

realising this is the same error as well, meaning it isn't just a ThemeHouse thing
😖

Have the fix ready (again) as when I was doing cherry picks and a git merge conflict this somehow made it back into the codebase without me seeing it / paying attention.

I want to wait for more information from @grabacontroller to have fixes for both issues in the same patch, if not though I'll have this out tonight by itself.
 
For anyone still experiencing the getStructure error message like the couple above here is a manual fix that can be applied (yes this damn thing is still happening in 1.7.3 as it seems I just shouldn't call the getStructure method at all rather than it being an issue with how I was saying what kind of type that method should return).


In your src/addons/TaylorJ/Blogs/XF/Entity/User.php file replace the entirety of the file with the following:
PHP:
<?php

namespace TaylorJ\Blogs\XF\Entity;

use XF\Mvc\Entity\Structure;

class User extends XFCP_User
{
    public function canViewBlogs(&$error = null)
    {
        return $this->hasPermission('taylorjBlogs', 'viewBlogs');
    }

    public function canViewBlogPosts(&$error = null)
    {
        return $this->hasPermission('taylorjBlogs', 'viewBlogs');
    }

    public function canCreateBlog(&$error = null)
    {
        return $this->hasPermission('taylorjBlogs', 'canCreate');
    }

    public function hasBlogPostPermission($contentId, $permission)
    {
        return $this->PermissionSet->hasContentPermission('resource_category', $contentId, $permission);
    }

    public function hasBlogPermission($contentId, $permission)
    {
        return $this->PermissionSet->hasContentPermission('taylorjBlogsPermissions', $contentId, $permission);
    }

}

Will have a patch out today (again) for this issue (again)
 
Hello,

I hope you're doing well.

I’m writing to report an issue I encountered with the TaylorJ Blogs add-on. After installing and later uninstalling the add-on, my XenForo system throws the following error when attempting to rebuild caches or run background jobs:

<span>Error: Class "TaylorJ\Blogs\ThreadType\BlogPostHandler" not found<br>in src/XF/App.php at line 1717</span>
From the stack trace, it appears that XenForo is still attempting to access the <span>BlogPostHandler</span> thread type during the <span>IconUsageAnalyzerService</span> process, even though the add-on has already been removed.

This suggests that some references to the custom thread type may not be fully cleaned up during the uninstall प्रक्रिया, possibly leaving residual data in the database (e.g., <span>xf_thread_type</span>) or related caches.

Steps to reproduce:

  1. Install the TaylorJ Blogs add-on
  2. Uninstall the add-on via AdminCP
  3. Run "Rebuild caches" or background jobs
  4. The error occurs
Temporary workaround:

  • Re-uploading the add-on files allows the system to function again
  • Manually removing leftover entries in the database (such as thread types) resolves the issue
However, this is not ideal for production environments.

Could you please review the uninstall routine and ensure that all registered thread types and related data are properly removed? It would be very helpful if the uninstall process could fully clean up any references to avoid this fatal error.

Thank you for your work on this add-on. I appreciate your time and support, and I look forward to your guidance or a fix.

Best regards,
1777944173362.webp
 
Back
Top Bottom