[TaylorJ] Blogs

[TaylorJ] Blogs 1.3.0

No permission to download
beta 5 > beta 6

1725351095705.webp

Code:
ErrorException: Batch install error: [E_WARNING] Undefined array key "taylorjBlogsBlogPostForum" src\XF\Options.php:22
Generated by: admin Sep 3, 2024 at 9:10 AM
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] Und...', 'C:\\laragon\\www\\...', 22)
#1 src\XF\Options.php(22): ArrayObject->offsetGet('taylorjBlogsBlo...')
#2 src\addons\TaylorJ\Blogs\Utils.php(79): XF\Options->offsetGet('taylorjBlogsBlo...')
#3 src\addons\TaylorJ\Blogs\Setup.php(163): TaylorJ\Blogs\Utils::setupBlogPostThreadCreation(Object(TaylorJ\Blogs\Entity\BlogPost))
#4 src\addons\TaylorJ\Blogs\Setup.php(125): TaylorJ\Blogs\Setup->giveBlogPostComments()
#5 src\XF\AddOn\StepRunnerUpgradeTrait.php(124): TaylorJ\Blogs\Setup->upgrade1000036Step2(Array)
#6 src\XF\AddOn\StepRunnerUpgradeTrait.php(73): TaylorJ\Blogs\Setup->upgradeStepRunner(1000036, 2, Array, NULL)
#7 src\XF\Job\AddOnInstallBatch.php(303): TaylorJ\Blogs\Setup->upgrade(Array)
#8 src\XF\Job\AddOnInstallBatch.php(95): XF\Job\AddOnInstallBatch->stepAction(Object(XF\Timer))
#9 src\XF\Job\Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#10 src\XF\Job\Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#11 src\XF\Job\Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#12 src\XF\Admin\Controller\ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#13 src\XF\Mvc\Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#14 src\XF\Mvc\Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#15 src\XF\Mvc\Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#16 src\XF\Mvc\Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src\XF\App.php(2813): XF\Mvc\Dispatcher->run()
#18 src\XF.php(802): XF\App->run()
#19 admin.php(15): XF::runApp('XF\\Admin\\App')
#20 {main}
Request state
array(4) {
  ["url"] => string(34) "/xenforo23/admin.php?tools/run-job"
  ["referrer"] => string(50) "http://localhost/xenforo23/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(86) "http://localhost/xenforo23/admin.php?add-ons/install-from-archive-complete&batch_id=29"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(4) "1307"
 
Uninstall > Reinstall
Trying to create a blog post

Code:
TypeError: XF\Service\Thread\CreatorService::__construct(): Argument #2 ($forum) must be of type XF\Entity\Forum, null given, called in C:\laragon\www\xenforo23\src\XF\Container.php on line 275 src\XF\Service\Thread\CreatorService.php:64
Generated by: user Sep 3, 2024 at 9:17 AM
Stack trace
#0 src\XF\Container.php(275): XF\Service\Thread\CreatorService->__construct(Object(XF\Pub\App), NULL)
#1 src\XF\App.php(1956): XF\Container->createObject('XF\\Service\\Thre...', Array)
#2 src\XF\Container.php(233): XF\App->XF\{closure}('XF\\Service\\Thre...', Array, Object(XF\Container))
#3 src\XF\App.php(3536): XF\Container->create('service', 'XF:Thread\\Creat...', Array)
#4 src\XF\Service\AbstractService.php(92): XF\App->service('XF:Thread\\Creat...', NULL)
#5 src\addons\TaylorJ\Blogs\Service\BlogPost\Create.php(146): XF\Service\AbstractService->service('XF:Thread\\Creat...', NULL)
#6 src\addons\TaylorJ\Blogs\Service\BlogPost\Create.php(110): TaylorJ\Blogs\Service\BlogPost\Create->setupBlogPostThreadCreation()
#7 src\XF\Service\ValidateAndSavableTrait.php(42): TaylorJ\Blogs\Service\BlogPost\Create->_save()
#8 src\addons\TaylorJ\Blogs\Pub\Controller\Blog.php(207): TaylorJ\Blogs\Service\BlogPost\Create->save()
#9 src\addons\TaylorJ\Blogs\Pub\Controller\Blog.php(185): TaylorJ\Blogs\Pub\Controller\Blog->blogPostSaveProcess(Object(XF\Mvc\ParameterBag))
#10 src\XF\Mvc\Dispatcher.php(362): TaylorJ\Blogs\Pub\Controller\Blog->actionPostSave(Object(XF\Mvc\ParameterBag))
#11 src\XF\Mvc\Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('TaylorJ\\Blogs:B...', 'PostSave', Object(XF\Mvc\RouteMatch), Object(TaylorJ\Blogs\Pub\Controller\Blog), NULL)
#12 src\XF\Mvc\Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(TaylorJ\Blogs\Pub\Controller\Blog), NULL)
#13 src\XF\Mvc\Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src\XF\App.php(2813): XF\Mvc\Dispatcher->run()
#15 src\XF.php(802): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(43) "/xenforo23/index.php?blogs/blog/0/post-save"
  ["referrer"] => string(72) "http://localhost/xenforo23/index.php?blogs/blog/my-first-blog.1/add-post"
  ["_GET"] => array(1) {
    ["blogs/blog/0/post-save"] => string(0) ""
  }
  ["_POST"] => array(13) {
    ["_xfToken"] => string(8) "********"
    ["blog_post_title"] => string(8) "The blog"
    ["message_html"] => string(452) "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"
    ["attachment_hash"] => string(32) "7dc94d4b204756b71e1dccc7ccdcb923"
    ["attachment_hash_combined"] => string(108) "{"type":"taylorj_blogs_blog_post","context":{"blog_post_id":null},"hash":"7dc94d4b204756b71e1dccc7ccdcb923"}"
    ["blog_post_schedule"] => string(1) "1"
    ["dd"] => string(10) "2024-09-03"
    ["hh"] => string(2) "09"
    ["mm"] => string(2) "16"
    ["blog_id"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(56) "/xenforo23/index.php?blogs/blog/my-first-blog.1/add-post"
  }
}

I removed the add-on then reinstalled it, when I recreated a blog using cover image B.jpg the blog used image A.jpg, the blog image that I had created before completely uninstalling the addon.
 
I updated from beta 5 to beta 6 and got the following error:

View attachment 310220
Ya me too
For some reason it didn't automatically select your first available forum/node id to use, will have a fix out today to handle that as well as the tool to create comment threads for already existing blog posts. If you select a forum in the Blogs settings you should be able to create new blog posts for now at least.

beta 5 > beta 6

View attachment 310231

Code:
ErrorException: Batch install error: [E_WARNING] Undefined array key "taylorjBlogsBlogPostForum" src\XF\Options.php:22
Generated by: admin Sep 3, 2024 at 9:10 AM
Stack trace
#0 [internal function]: XF::handlePhpError(2, '[E_WARNING] Und...', 'C:\\laragon\\www\\...', 22)
#1 src\XF\Options.php(22): ArrayObject->offsetGet('taylorjBlogsBlo...')
#2 src\addons\TaylorJ\Blogs\Utils.php(79): XF\Options->offsetGet('taylorjBlogsBlo...')
#3 src\addons\TaylorJ\Blogs\Setup.php(163): TaylorJ\Blogs\Utils::setupBlogPostThreadCreation(Object(TaylorJ\Blogs\Entity\BlogPost))
#4 src\addons\TaylorJ\Blogs\Setup.php(125): TaylorJ\Blogs\Setup->giveBlogPostComments()
#5 src\XF\AddOn\StepRunnerUpgradeTrait.php(124): TaylorJ\Blogs\Setup->upgrade1000036Step2(Array)
#6 src\XF\AddOn\StepRunnerUpgradeTrait.php(73): TaylorJ\Blogs\Setup->upgradeStepRunner(1000036, 2, Array, NULL)
#7 src\XF\Job\AddOnInstallBatch.php(303): TaylorJ\Blogs\Setup->upgrade(Array)
#8 src\XF\Job\AddOnInstallBatch.php(95): XF\Job\AddOnInstallBatch->stepAction(Object(XF\Timer))
#9 src\XF\Job\Manager.php(275): XF\Job\AddOnInstallBatch->run(8)
#10 src\XF\Job\Manager.php(205): XF\Job\Manager->runJobInternal(Array, 8)
#11 src\XF\Job\Manager.php(121): XF\Job\Manager->runJobEntry(Array, 8)
#12 src\XF\Admin\Controller\ToolsController.php(146): XF\Job\Manager->runByIds(Array, 8)
#13 src\XF\Mvc\Dispatcher.php(362): XF\Admin\Controller\ToolsController->actionRunJob(Object(XF\Mvc\ParameterBag))
#14 src\XF\Mvc\Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('XF:Tools', 'RunJob', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#15 src\XF\Mvc\Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\ToolsController), NULL)
#16 src\XF\Mvc\Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src\XF\App.php(2813): XF\Mvc\Dispatcher->run()
#18 src\XF.php(802): XF\App->run()
#19 admin.php(15): XF::runApp('XF\\Admin\\App')
#20 {main}
Request state
array(4) {
  ["url"] => string(34) "/xenforo23/admin.php?tools/run-job"
  ["referrer"] => string(50) "http://localhost/xenforo23/admin.php?tools/run-job"
  ["_GET"] => array(1) {
    ["tools/run-job"] => string(0) ""
  }
  ["_POST"] => array(3) {
    ["_xfRedirect"] => string(86) "http://localhost/xenforo23/admin.php?add-ons/install-from-archive-complete&batch_id=29"
    ["_xfToken"] => string(8) "********"
    ["only_ids"] => string(4) "1307"
I'm thinking this may be the same issue as above, since no default forum was selected programmatically for comment threads this failed. The same fix should address this

Uninstall > Reinstall
Trying to create a blog post

Code:
TypeError: XF\Service\Thread\CreatorService::__construct(): Argument #2 ($forum) must be of type XF\Entity\Forum, null given, called in C:\laragon\www\xenforo23\src\XF\Container.php on line 275 src\XF\Service\Thread\CreatorService.php:64
Generated by: user Sep 3, 2024 at 9:17 AM
Stack trace
#0 src\XF\Container.php(275): XF\Service\Thread\CreatorService->__construct(Object(XF\Pub\App), NULL)
#1 src\XF\App.php(1956): XF\Container->createObject('XF\\Service\\Thre...', Array)
#2 src\XF\Container.php(233): XF\App->XF\{closure}('XF\\Service\\Thre...', Array, Object(XF\Container))
#3 src\XF\App.php(3536): XF\Container->create('service', 'XF:Thread\\Creat...', Array)
#4 src\XF\Service\AbstractService.php(92): XF\App->service('XF:Thread\\Creat...', NULL)
#5 src\addons\TaylorJ\Blogs\Service\BlogPost\Create.php(146): XF\Service\AbstractService->service('XF:Thread\\Creat...', NULL)
#6 src\addons\TaylorJ\Blogs\Service\BlogPost\Create.php(110): TaylorJ\Blogs\Service\BlogPost\Create->setupBlogPostThreadCreation()
#7 src\XF\Service\ValidateAndSavableTrait.php(42): TaylorJ\Blogs\Service\BlogPost\Create->_save()
#8 src\addons\TaylorJ\Blogs\Pub\Controller\Blog.php(207): TaylorJ\Blogs\Service\BlogPost\Create->save()
#9 src\addons\TaylorJ\Blogs\Pub\Controller\Blog.php(185): TaylorJ\Blogs\Pub\Controller\Blog->blogPostSaveProcess(Object(XF\Mvc\ParameterBag))
#10 src\XF\Mvc\Dispatcher.php(362): TaylorJ\Blogs\Pub\Controller\Blog->actionPostSave(Object(XF\Mvc\ParameterBag))
#11 src\XF\Mvc\Dispatcher.php(265): XF\Mvc\Dispatcher->dispatchClass('TaylorJ\\Blogs:B...', 'PostSave', Object(XF\Mvc\RouteMatch), Object(TaylorJ\Blogs\Pub\Controller\Blog), NULL)
#12 src\XF\Mvc\Dispatcher.php(121): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(TaylorJ\Blogs\Pub\Controller\Blog), NULL)
#13 src\XF\Mvc\Dispatcher.php(63): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src\XF\App.php(2813): XF\Mvc\Dispatcher->run()
#15 src\XF.php(802): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(43) "/xenforo23/index.php?blogs/blog/0/post-save"
  ["referrer"] => string(72) "http://localhost/xenforo23/index.php?blogs/blog/my-first-blog.1/add-post"
  ["_GET"] => array(1) {
    ["blogs/blog/0/post-save"] => string(0) ""
  }
  ["_POST"] => array(13) {
    ["_xfToken"] => string(8) "********"
    ["blog_post_title"] => string(8) "The blog"
    ["message_html"] => string(452) "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>"
    ["attachment_hash"] => string(32) "7dc94d4b204756b71e1dccc7ccdcb923"
    ["attachment_hash_combined"] => string(108) "{"type":"taylorj_blogs_blog_post","context":{"blog_post_id":null},"hash":"7dc94d4b204756b71e1dccc7ccdcb923"}"
    ["blog_post_schedule"] => string(1) "1"
    ["dd"] => string(10) "2024-09-03"
    ["hh"] => string(2) "09"
    ["mm"] => string(2) "16"
    ["blog_id"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
    ["_xfWithData"] => string(1) "1"
    ["_xfRequestUri"] => string(56) "/xenforo23/index.php?blogs/blog/my-first-blog.1/add-post"
  }
}

I removed the add-on then reinstalled it, when I recreated a blog using cover image B.jpg the blog used image A.jpg, the blog image that I had created before completely uninstalling the addon.
The error/stack trace here is also due to the same bug above. If you select a forum in addons settings you should be able to make new blog posts.

Now the other bug you mentioned I will have to attempt to reproduce on my end. That is a really strange one...
 
I was made aware of a bug with this addon and supporting 2.2 for this beta release for a new feature I forgot to add to the update...

Latest Blog Post Widget! - You can now add a widget to show the latest blog posts made in all blogs. This is really only meant for the sidebar but if it looks off/weird in wherever you put it please let me know with a screenshot as to add more styling if needed.

And now back to the 2.2 bug...
The below fix should get it back to normal but if not please let me know.

'taylorj_blogs_blog_post_list_macros.html' from
<xf:macro id="item_new_blog_posts" arg-blogPost="!">

to
<xf:macro id="item_new_blog_posts" name="item_new_blog_posts" arg-blogPost="!">

and changing 'widget_taylorj_blogs_new_blog_posts.html' on line 11 from
<xf:macro id="taylorj_blogs_blog_post_list_macros::item_new_blog_posts"
arg-blogPost="{$blogPost}" />

to
<xf:macro template="taylorj_blogs_blog_post_list_macros" name="item_new_blog_posts"
arg-blogPost="{$blogPost}" />



I should also state this will most likely be the last release to support 2.2.x.
 
Congratulations..! Xenporta has benefited in terms of SEO.! I think it will be very useful for the blog as well.! I will definitely download it and try it. Thank you very much.
 
A hotfix has been uploaded titled 1.0.0 Beta 6 Hotfix 1 to the RM here. You should only have to replace your current files with this.

If you haven't ran the upgrade yet, after replacing the files make sure to go to the Blog addons settings and choose a forum to use.

For everyone else that was experiencing issues with the upgrade when it came to the errors above make sure to also already have a forum selected to use in the Blogs addon settings then attempt to upgrade. If your old blog posts do not have threads for comments after that you can find the new "Create Blog Post Comment Threads" under Tools->Rebuild Cache in your ACP.
 
@Taylor J Congratulations. I think it is a very important addon in terms of SEO. Xenporta and Blog addon.! I have a question, does this addon work without problems with xenforo2.3.3 version?
 
@Taylor J Congratulations. I think it is a very important addon in terms of SEO. Xenporta and Blog addon.! I have a question, does this addon work without problems with xenforo2.3.3 version?
It should, I didn't see anything in the release notes that would cause a breakage, but I also haven't updated my dev environment either yet to fully test it out.
 
forum, a blog in addition to the portal...! Blog posts written independently of the forum are automatically created as a short title in the forum for discussion. This is a revolution in addons in Xenforo. I have thought about such a thing a lot. I never preferred Wordpress etc. because all blog systems have database vulnerabilities..! 16 of my sites were hacked.
 
Taylor J updated [TaylorJ] Blogs with a new update entry:

1.0.0 Beta 7

New features
  • Reports - Users can now report blog posts to get moderator/admin attention
  • What's New Page - Blog Posts have been added to the what's new page with a widget that can be placed in the main overview
  • User Profile View - Blog Posts are now listed on a users profile page as a place to find all of their posts no matter which blog
Bug Fixes
  • Default forum for comment threads not being chosen on install has now been fixed, this will now use your first...

Read the rest of this update entry...
 
What am I doing wrong? I deleted the tables. Deleted the files. Installed it fresh and now it says.


XF\Db\InvalidQueryException: xf_user: MySQL query error [1061]: Duplicate key name 'blog_post_count' in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 83
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 158
  5. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 157
  6. XF\Db\SchemaManager->alterTable() in src/addons/TaylorJ/Blogs/Setup.php at line 70
  7. TaylorJ\Blogs\Setup->installStep4() in src/XF/AddOn/StepRunnerInstallTrait.php at line 62
  8. TaylorJ\Blogs\Setup->installStepRunner() in src/XF/AddOn/StepRunnerInstallTrait.php at line 29
  9. TaylorJ\Blogs\Setup->install() in src/XF/Admin/Controller/AddOnController.php at line 435
  10. XF\Admin\Controller\AddOnController->actionInstall() in src/XF/Mvc/Dispatcher.php at line 362
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  15. XF\App->run() in src/XF.php at line 806
  16. XF::runApp() in admin.php at line 15
 
Last edited:
What am I doing wrong? I deleted the tables. Deleted the files. Installed it fresh and now it says.


XF\Db\InvalidQueryException: xf_user: MySQL query error [1061]: Duplicate key name 'blog_post_count' in src/XF/Db/AbstractStatement.php at line 230
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 207
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 83
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 96
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/Schema/AbstractDdl.php at line 158
  5. XF\Db\Schema\AbstractDdl->apply() in src/XF/Db/SchemaManager.php at line 157
  6. XF\Db\SchemaManager->alterTable() in src/addons/TaylorJ/Blogs/Setup.php at line 70
  7. TaylorJ\Blogs\Setup->installStep4() in src/XF/AddOn/StepRunnerInstallTrait.php at line 62
  8. TaylorJ\Blogs\Setup->installStepRunner() in src/XF/AddOn/StepRunnerInstallTrait.php at line 29
  9. TaylorJ\Blogs\Setup->install() in src/XF/Admin/Controller/AddOnController.php at line 435
  10. XF\Admin\Controller\AddOnController->actionInstall() in src/XF/Mvc/Dispatcher.php at line 362
  11. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  12. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  13. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  14. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  15. XF\App->run() in src/XF.php at line 806
  16. XF::runApp() in admin.php at line 15
Is this during install? Or when doing something else?
 
Back
Top Bottom