[cv6] Custom Field Extension

[cv6] Custom Field Extension 1.1.0 Release Candidate 2

No permission to download

securedme

Active member
Code:
ErrorException: [E_WARNING] Array to string conversion src/XF/Search/IndexRecord.php:24
Generated by: beta Aug 2, 2022 at 11:58 PM
Stack trace
#0 src/XF/Search/IndexRecord.php(24): XF::handlePhpError(2, '[E_WARNING] Arr...', '/home/nginx/dom...', 24)
#1 src/XF/Search/IndexRecord.php(48): XF\Search\IndexRecord->__construct('thread_field', 762, '', Array, 1659455928, 3, 153, Array)
#2 src/addons/AL/FilterFramework/Search/Data/BaseFieldIndexSearchData.php(93): XF\Search\IndexRecord::create('thread_field', 762, Array)
#3 src/XF/Search/Search.php(39): AL\FilterFramework\Search\Data\BaseFieldIndexSearchData->getIndexData(Object(AL\ThreadFilter\Entity\ThreadFieldIndex))
#4 src/XF/Behavior/Indexable.php(48): XF\Search\Search->index('thread_field', Object(AL\ThreadFilter\Entity\ThreadFieldIndex), false)
#5 src/XF.php(377): XF\Behavior\Indexable->XF\Behavior\{closure}()
#6 src/XF/Mvc/Dispatcher.php(158): XF::triggerRunOnce(true)
#7 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#8 src/XF/App.php(2352): XF\Mvc\Dispatcher->run()
#9 src/XF.php(524): XF\App->run()
#10 index.php(20): XF::runApp('XF\\Pub\\App')
#11 {main}

Seems it clashes with https://xenforo.com/community/resources/thread-filter-by-addonslab.6034/

I disabled it and your add-on works without errors.

@AddonsLab Any help on this?
 

Kirby

Well-known member
This is a nice Add-on :)

Some suggestions for the Combo type
  1. If would be nice if the dropdown could optionally have an empty option
  2. Setting the field Required does not seem to work properly - if the select is on the left side the textbox can be left empty
    Could this be changed so either an input in the textbox, a selection from the dropdown or both are required if the field is set Required?
  3. It would be nice to have a third layout option: Dropdown on top and the textbox below it (optionally with the text above it)
 

Oyle

New member
Hi
thank you for the great AddOn.

I have a question. Can Is it possible to change the presentation of the Images?
I want show the complete Image instead a Preview of this, like the Screenshot I attached.

An ideas of ways to do this?

Thanks
 

Attachments

  • customimage.PNG
    customimage.PNG
    90.9 KB · Views: 5

Hoffi

Well-known member
There are more display Options planned for the next Version..
This is a nice Add-on :)

Some suggestions for the Combo type
  1. If would be nice if the dropdown could optionally have an empty option
  2. Setting the field Required does not seem to work properly - if the select is on the left side the textbox can be left empty
    Could this be changed so either an input in the textbox, a selection from the dropdown or both are required if the field is set Required?
  3. It would be nice to have a third layout option: Dropdown on top and the textbox below it (optionally with the text above it)
Good Ideas. Will Take them on my list.
 

Hoffi

Well-known member
Hoffi updated [cv6] Custom Field Extension with a new update entry:

1.1.0 - new Features and many bug fixes

1.1.0 RC
  • fixed mandatory combo field bug
  • fixex resource rating image (wasn't working properly)
  • fixed bug entity chooser ignores required
  • fixed bug with entity chooser has no class selected
  • fixed bug with step display on mobile devices
  • fixed bug with drag-drop upload in first post
  • optimized database structure
  • Upgrade nxp/math-executor to 2.3.1
  • rewrite of save routine to a better (the correct) solution
New features:
  • added ability to...

Read the rest of this update entry...
 

zoldos

Well-known member
I got about 10 of these after adding some custom things with your mod and making them available during registration:

Code:
[LIST]
[*]TypeError: Argument 3 passed to cv6\CustomFields\XF\CustomField\Set::assignAttachments() must be of the type int, null given, called in /var/www/vhosts/ourdarkhome.com/httpdocs/src/addons/cv6/CustomFields/Entity/ContainerTrait.php on line 29
[*]src/addons/cv6/CustomFields/XF/CustomField/Set.php:210
[*]Generated by: Unknown account
[*]Oct 8, 2022 at 3:25 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/addons/cv6/CustomFields/Entity/ContainerTrait.php(29): cv6\CustomFields\XF\CustomField\Set->assignAttachments('user-profile', 'user-profile', NULL)
#1 src/XF/Mvc/Entity/Entity.php(1272): cv6\CustomFields\XF\Entity\UserProfile->_postSave()
#2 src/XF/Mvc/Entity/Entity.php(1266): XF\Mvc\Entity\Entity->save(true, false)
#3 src/XF/Service/User/Registration.php(301): XF\Mvc\Entity\Entity->save()
#4 src/XF/Service/ValidateAndSavableTrait.php(42): XF\Service\User\Registration->_save()
#5 src/XF/Pub/Controller/Register.php(426): XF\Service\User\Registration->save()
#6 src/addons/XenSoluce/AvatarGallery/XF/Pub/Controller/Register.php(79): XF\Pub\Controller\Register->actionRegister()
#7 src/XF/Mvc/Dispatcher.php(352): XenSoluce\AvatarGallery\XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', Object(XF\Mvc\RouteMatch), Object(XenSoluce\AvatarGallery\XF\Pub\Controller\Register), NULL)
#9 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenSoluce\AvatarGallery\XF\Pub\Controller\Register), NULL)
#10 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}
[HEADING=2]Request state[/HEADING]
array(4) {
  ["url"] => string(18) "/register/register"
  ["referrer"] => string(24) "https://ourdarkhome.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(16) {
    ["_xfToken"] => string(8) "********"
    ["b33ca"] => string(9) "xxxxx"
    ["username"] => string(0) ""
    ["67a90"] => string(25) "xxxx"
    ["email"] => string(0) ""
    ["7a4c58"] => string(8) "********"
    ["dob_month"] => string(1) "6"
    ["dob_day"] => string(2) "12"
    ["dob_year"] => string(4) "1993"
    ["custom_fields"] => array(1) {
      ["custom3"] => string(2) "01"
    }
    ["email_choice"] => string(1) "1"
    ["reg_key"] => string(16) "S2Z1pUNxIkbQBoZG"
    ["a79b"] => string(16) "Europe/Amsterdam"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
Delete

Any ideas? I really like the mod!

Update: It seems to work okay if the custom fields are NOT enabled for registration. :)
 

zoldos

Well-known member
It seems to work great as long as none of the options are enabled for registration, so no worries!
 

Hoffi

Well-known member
Thank you for reporting. Will take a closer look into it.
This is related to images during registration, correct? Thats a very spcial case.
 

zoldos

Well-known member
Found the bug, fixed in next version.
Cool! I did find one other issue. When someone tried to register, it threw an "opps there was a problem" error, and the below server error. I disabled and mod, and it fixed the error:

Code:
TypeError: Argument 3 passed to cv6\CustomFields\XF\CustomField\Set::assignAttachments() must be of the type int, null given, called in /var/www/vhosts/ourdarkhome.com/httpdocs/src/addons/cv6/CustomFields/Entity/ContainerTrait.php on line 29 src/addons/cv6/CustomFields/XF/CustomField/Set.php:210
Generated by: Unknown account Oct 9, 2022 at 5:53 PM
Stack trace
#0 src/addons/cv6/CustomFields/Entity/ContainerTrait.php(29): cv6\CustomFields\XF\CustomField\Set->assignAttachments('user-profile', 'user-profile', NULL)
#1 src/XF/Mvc/Entity/Entity.php(1272): cv6\CustomFields\XF\Entity\UserProfile->_postSave()
#2 src/XF/Mvc/Entity/Entity.php(1266): XF\Mvc\Entity\Entity->save(true, false)
#3 src/XF/Service/User/Registration.php(301): XF\Mvc\Entity\Entity->save()
#4 src/XF/Service/ValidateAndSavableTrait.php(42): XF\Service\User\Registration->_save()
#5 src/XF/Pub/Controller/Register.php(426): XF\Service\User\Registration->save()
#6 src/addons/XenSoluce/AvatarGallery/XF/Pub/Controller/Register.php(79): XF\Pub\Controller\Register->actionRegister()
#7 src/XF/Mvc/Dispatcher.php(352): XenSoluce\AvatarGallery\XF\Pub\Controller\Register->actionRegister(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Register', 'Register', Object(XF\Mvc\RouteMatch), Object(XenSoluce\AvatarGallery\XF\Pub\Controller\Register), NULL)
#9 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XenSoluce\AvatarGallery\XF\Pub\Controller\Register), NULL)
#10 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}
Request state
array(4) {
  ["url"] => string(18) "/register/register"
  ["referrer"] => string(24) "https://xxx/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(14) {
    ["_xfToken"] => string(8) "********"
    ["7d74061a186a07df5d3172c3ff09501f0de6c81e"] => string(4) "test"
    ["username"] => string(0) ""
    ["9d791d832bb2"] => string(13) "test@test.com"
    ["0ad148d220d6d01c71c"] => string(8) "********"
    ["dob_month"] => string(1) "1"
    ["dob_day"] => string(2) "08"
    ["dob_year"] => string(4) "1975"
    ["email_choice"] => string(1) "1"
    ["reg_key"] => string(16) "MFBnoI_IfX-E_x5s"
    ["663118abb27456e12c7c6e1af"] => string(15) "America/Chicago"
    ["_xfRequestUri"] => string(1) "/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Top