[XB] Custom Field Default Value

[XB] Custom Field Default Value [Paid] 2.0.1 Patch Level 2

No permission to buy ($10.00)
Can I have a default value for all types of field?
Also multi line and the message field with editor?

Funny! I have bought it yesterday, so I should try this by myself. :)
Sorry, working now 20 hours ...
 
Have been having issues for the past day or so - not sure why suddenly. I've probably got about 30 pages of errors with the same error.

@Painbaker @Bob

Code:
Server error log
ErrorException: Template error: [E_USER_WARNING] Method canViewArticleAttachments is not callable on the given object (PB\CustomFieldDefaultValue\XenAddons\AMS\Entity\ArticleItem) src/XF/Template/Templater.php:1186
Generated by: Unknown account 22 January 2024 at 10:58 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/behindthe...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewA...', 512)
#2 internal_data/code_cache/templates/l1/s17/public/xa_ams_article_view.php(1095): XF\Template\Templater->method(Object(PB\CustomFieldDefaultValue\XenAddons\AMS\Entity\ArticleItem), 'canViewArticleA...', Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\AdvancedBbCodesPack\XF\Template\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/Traits/Templater/XF22.php(52): XF\Template\Templater->renderTemplate('xa_ams_article_...', Array, true, NULL)
#5 src/addons/MaZ/AUN/XF/Template/Templater.php(39): MaZ\AMP\XF\Template\Templater->renderTemplate('public:xa_ams_a...', Array, true, NULL)
#6 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:xa_ams_a...', Array)
#7 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#8 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XenAddons\\AMS:A...', 'public:xa_ams_a...', Array)
#9 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
Request state
array(4) {
  ["url"] => string(63) "/articles/xxreplacedxx.252/"
  ["referrer"] => string(94) "xxreplacedxx/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

There appears to be a conflict with Bobs AMS. Hope you can help :)
 
Have been having issues for the past day or so - not sure why suddenly. I've probably got about 30 pages of errors with the same error.
We don't have any canViewArticleAttachments method calls in this add-on
This may be caused by AMP/AUN add-ons with outdated templates.

 
We don't have any canViewArticleAttachments method calls in this add-on
This may be caused by AMP/AUN add-ons with outdated templates.

Ah apologies - my bad. I'm so great at reading stack traces, and as I saw PB on the title of every error, that was my assumption. Thanks for clarifying :)
 
We don't have any canViewArticleAttachments method calls in this add-on
This may be caused by AMP/AUN add-ons with outdated templates.

There should be no such calls in AMP/AUN also what I can tell...

And in both of the cases the templaters there will just call the parent::renderTemplate(...) unless the page is either:
  1. AMP page (URL from trace doesn't contain ?amp=1 so not that
  2. AUN aun_api_key_info template (which it isn't either)
Have been having issues for the past day or so - not sure why suddenly. I've probably got about 30 pages of errors with the same error.

@Painbaker @Bob

Code:
Server error log
ErrorException: Template error: [E_USER_WARNING] Method canViewArticleAttachments is not callable on the given object (PB\CustomFieldDefaultValue\XenAddons\AMS\Entity\ArticleItem) src/XF/Template/Templater.php:1186
Generated by: Unknown account 22 January 2024 at 10:58 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/behindthe...', 1186)
#1 src/XF/Template/Templater.php(1186): trigger_error('Method canViewA...', 512)
#2 internal_data/code_cache/templates/l1/s17/public/xa_ams_article_view.php(1095): XF\Template\Templater->method(Object(PB\CustomFieldDefaultValue\XenAddons\AMS\Entity\ArticleItem), 'canViewArticleA...', Array)
#3 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\AdvancedBbCodesPack\XF\Template\Templater), Array, NULL)
#4 src/addons/MaZ/AMP/Traits/Templater/XF22.php(52): XF\Template\Templater->renderTemplate('xa_ams_article_...', Array, true, NULL)
#5 src/addons/MaZ/AUN/XF/Template/Templater.php(39): MaZ\AMP\XF\Template\Templater->renderTemplate('public:xa_ams_a...', Array, true, NULL)
#6 src/XF/Template/Template.php(24): MaZ\AUN\XF\Template\Templater->renderTemplate('public:xa_ams_a...', Array)
#7 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#8 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XenAddons\\AMS:A...', 'public:xa_ams_a...', Array)
#9 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#13 src/XF.php(524): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}
Request state
array(4) {
  ["url"] => string(63) "/articles/xxreplacedxx.252/"
  ["referrer"] => string(94) "xxreplacedxx/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

There appears to be a conflict with Bobs AMS. Hope you can help :)
Have you recently updated any add-ons or templates? I would start by looking there :)
 
With this addon could all the custom fields of a thread that have not yet been filled be shown, for example showing a hyphen by default?

I see that it has an "as defined" option, but I don't know if it is to select an option from among the possible ones in the custom fields or to autofill with a hyphen for example
 
Back
Top Bottom