[TaylorJ] Blogs

[TaylorJ] Blogs 1.3.0

No permission to download
It says this too. There are manual rebuild jobs awaiting completion. Continue running them

It doesn't happen anywhere else. I think it's a cron job.
If it's only happening there then I'm not sure it has to do with a cron job. No cron job deals with the thread type handler, could you past the stack trace from the error that you get on the rebuild icons job as to see where that leads.
 
Ya I don't think it's nothing to do with a cron job. My bad.

I just figured it out. It was the following addon. I am sorry about this.

DragonByte Favicons​

 
Major League Soccer Reaction GIF by Sporting KC



Phew thought I had messed something up drastically
 
I noticed if you start the post at 1:03 am and it says 1:03 am where you schedule later it errors but if you start the post at 1:04 am and schedule it to 1:10 it works fine.

It needs to say this "Please schedule at a later time" instead of the error below in my opinion.

TypeError: XF\Repository\PostRepository::findPostsForThreadView(): Argument #1 ($thread) must be of type XF\Entity\Thread, null given, called in /public_html/src/addons/TaylorJ/Blogs/Pub/Controller/BlogPost.php on line 36 in src/XF/Repository/PostRepository.php at line 12
  1. XF\Repository\PostRepository->findPostsForThreadView() in src/addons/TaylorJ/Blogs/Pub/Controller/BlogPost.php at line 36
  2. TaylorJ\Blogs\Pub\Controller\BlogPost->actionIndex() in src/XF/Mvc/Dispatcher.php at line 362
  3. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  4. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  5. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  6. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  7. XF\App->run() in src/XF.php at line 806
  8. XF::runApp() in index.php at line 23
 
With release candidate 1, when clicking into a blog posts I am getting (all other addons disabled)

Code:
InvalidArgumentException: Macro public:custom_fields_macros :: custom_fields_values() error: Container key 'customFields.resourceReviews' was not found src/XF/Container.php:48
Generated by:xxxxxx Sep 24, 2024 at 1:49 PM
Stack trace
#0 src/XF/App.php(2365): XF\Container->offsetGet('customFields.re...')
#1 src/XF/Template/Templater.php(1283): XF\App->getCustomFields('resourceReviews', 'below_review', NULL, Array)
#2 internal_data/code_cache/templates/l1/s133/public/custom_fields_macros.php(85): XF\Template\Templater->method(Object(XF\Pub\App), 'getCustomFields', Array)
#3 src/XF/Template/Templater.php(922): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s133/public/custom_fields_macros.php(25): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_v...', Array, Array)
#5 src/XF/Template/Templater.php(922): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s133/public/taylorj_blogs_blog_post_view.php(401): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_v...', Array, Array)
#7 src/XF/Template/Templater.php(1792): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('taylorj_blogs_b...', Array)
#9 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(471): XF\Mvc\Renderer\Html->renderView('TaylorJ\\Blogs:B...', 'public:taylorj_...', Array)
#11 src/XF/Mvc/Dispatcher.php(453): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(412): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(66): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2826): XF\Mvc\Dispatcher->run()
#15 src/XF.php(806): XF\App->run()
#16 index.php(23): XF::runApp('XF\\Pub\\App')
#17 {main}
Request state
array(4) {
  ["url"] => string(29) "/blogs/post/new-blog-posts.1/"
  ["referrer"] => string(54) "https://xxxxxx/blogs/blog/petes-blog.1/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 
Last edited:
I noticed if you start the post at 1:03 am and it says 1:03 am where you schedule later it errors but if you start the post at 1:04 am and schedule it to 1:10 it works fine.

It needs to say this "Please schedule at a later time" instead of the error below in my opinion.

TypeError: XF\Repository\PostRepository::findPostsForThreadView(): Argument #1 ($thread) must be of type XF\Entity\Thread, null given, called in /public_html/src/addons/TaylorJ/Blogs/Pub/Controller/BlogPost.php on line 36 in src/XF/Repository/PostRepository.php at line 12
  1. XF\Repository\PostRepository->findPostsForThreadView() in src/addons/TaylorJ/Blogs/Pub/Controller/BlogPost.php at line 36
  2. TaylorJ\Blogs\Pub\Controller\BlogPost->actionIndex() in src/XF/Mvc/Dispatcher.php at line 362
  3. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
  4. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  5. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  6. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2826
  7. XF\App->run() in src/XF.php at line 806
  8. XF::runApp() in index.php at line 23
For this specifically I am now just throwing an error with a stack trace that also says to choose a date in the future. I thought of just having any blog post with a date selected in the past to just be forcefully saved as a visible post instead but thought that may be too anti user, especially if they really did want the blog post to be scheduled rather than visible.
 
I don't mean to be a jerk or anything but I would prefer no stack trace error to show up at all. If you can't figure it out, maybe you can make a option to remove the scheduler all together. I would like that very much.
 
I don't mean to be a jerk or anything but I would prefer no stack trace error to show up at all. If you can't figure it out, maybe you can make a option to remove the scheduler all together. I would like that very much.
For now it's going to be as a stack trace until I figure out a better looking way for it to appear. I am already toying with using XF's auto verify system that can be used in entities but haven't had the chance to try that out yet fully.

Having scheduled posts as an option is something I may implement sooner rather than later, so admins can have more fine control over what user
groups can do with the addon.

Can this be permissions-based use? Meaning, something that you could set exclusively for premium members?
It should be able to as of now
1727362641166.webp

Right now the permissions are very rudimentary and will be fleshed out to be more robust as new versions come out but it should be able to do what you want as of right now.
 
For now it's going to be as a stack trace until I figure out a better looking way for it to appear. I am already toying with using XF's auto verify system that can be used in entities but haven't had the chance to try that out yet fully.

This was easier to accomplish than I thought and got confused by all the different ways to handle dates, times, and DateTimes in PHP but this now has a prettier "error" popup like as if you forgot to enter a title or too short of a title.

This will be included in the gold release which I'll have shipped probably tomorrow if no one reports any bugs today/early tomorrow.

The option to not allow scheduled posts won't be until 1.1.0 or later though.
 
Back
Top Bottom