[cv6] Custom Field Extension

[cv6] Custom Field Extension 1.1.0 Release Candidate 3

No permission to download
@Hoffi Has anyone got this successfully working with Bobs addons? Such as showcase/ams ?

I've noticed a few things so far doesn't seem to work. Those things include -

Sorting of fields (appears to double up buttons for some reason)
Default placement of text does not work for fields

Hope someone can help get this working. I really want to make the field system more powerful and this seems great!
 
Thank you very much.
Maybe you want to think about a date_field also, please?
A date_field where I can search for and use as criteria.

I can add a text field now and use it for a date, but I cant search for it in a range of from to
 
There is a date field altready possible in XF Core. So I don't see any need.

Or dou you need more?
 
Emnter the maximum number of images that can be uploaded for this field.

Have tried it in a clean install;
added imagefield to thread;
have no form_field when adding a new thread
 
Emnter the maximum number of images that can be uploaded for this field.

Have tried it in a clean install;
added imagefield to thread;
have no form_field when adding a new thread
Same, the field is just blank when creating a new post/resource.
 
Hello, your addon is great, however when trying to use a custom field for images I get the following Server error log:

Code:
XF\Db\Exception: Macro public:cv6_custom_fields_macros :: custom_fields_edit_image() error: MySQL statement prepare error [1054]: Unknown column 'xf_cv6_custom_image.content_id' in 'where clause' src/XF/Db/AbstractStatement.php:228

Code:
SELECT `xf_cv6_custom_image`.*
            FROM `xf_cv6_custom_image`
            
            WHERE (`xf_cv6_custom_image`.`field_id` = 'cover') AND (`xf_cv6_custom_image`.`field_source` = 'resource') AND (`xf_cv6_custom_image`.`user_id` = 1) AND (`xf_cv6_custom_image`.`content_id` = 4)
            
        
LIMIT 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1346): XF\Db\AbstractAdapter->query('
            SELECT `xf_...')
#5 src/addons/cv6/CustomFields/Attachment/CustomImage.php(64): XF\Mvc\Entity\Finder->fetchOne()
#6 src/XF/Repository/Attachment.php(33): cv6\CustomFields\Attachment\CustomImage->getContainerIdFromContext(Array)
#7 src/addons/cv6/CustomFields/XF/CustomField/Definition.php(93): XF\Repository\Attachment->getEditorData('cv6_custom_imag...', Object(SV\MultiPrefix\XFRM\Entity\ResourceItem), '490fb3de2d9e182...', Array)
#8 [internal function]: cv6\CustomFields\XF\CustomField\Definition->getCustomImageData(Object(SV\MultiPrefix\XFRM\Entity\ResourceItem))
#9 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#10 internal_data/code_cache/templates/l3/s3/public/cv6_custom_fields_macros.php(23): XF\Template\Templater->method(Object(cv6\CustomFields\XF\CustomField\Definition), 'getCustomImageD...', Array)
#11 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#12 internal_data/code_cache/templates/l3/s3/public/custom_fields_macros.php(664): XF\Template\Templater->callMacro('cv6_custom_fiel...', 'custom_fields_e...', Array, Array)
#13 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#14 internal_data/code_cache/templates/l3/s3/public/custom_fields_macros.php(229): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_e...', Array, Array)
#15 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#16 internal_data/code_cache/templates/l3/s3/public/xfrm_resource_edit.php(66): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_e...', Array, Array)
#17 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#18 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('xfrm_resource_e...', Array)
#19 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#20 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:ResourceItem...', 'public:xfrm_res...', Array)
#21 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#23 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#24 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#25 src/XF.php(488): XF\App->run()
#26 index.php(20): XF::runApp('XF\\Pub\\App')
#27 {main}
 
I think the author never appeared :(
Hello, your addon is great, however when trying to use a custom field for images I get the following Server error log:

Code:
XF\Db\Exception: Macro public:cv6_custom_fields_macros :: custom_fields_edit_image() error: MySQL statement prepare error [1054]: Unknown column 'xf_cv6_custom_image.content_id' in 'where clause' src/XF/Db/AbstractStatement.php:228

Code:
SELECT `xf_cv6_custom_image`.*
            FROM `xf_cv6_custom_image`
           
            WHERE (`xf_cv6_custom_image`.`field_id` = 'cover') AND (`xf_cv6_custom_image`.`field_source` = 'resource') AND (`xf_cv6_custom_image`.`user_id` = 1) AND (`xf_cv6_custom_image`.`content_id` = 4)
           
       
LIMIT 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Mvc/Entity/Finder.php(1346): XF\Db\AbstractAdapter->query('
            SELECT `xf_...')
#5 src/addons/cv6/CustomFields/Attachment/CustomImage.php(64): XF\Mvc\Entity\Finder->fetchOne()
#6 src/XF/Repository/Attachment.php(33): cv6\CustomFields\Attachment\CustomImage->getContainerIdFromContext(Array)
#7 src/addons/cv6/CustomFields/XF/CustomField/Definition.php(93): XF\Repository\Attachment->getEditorData('cv6_custom_imag...', Object(SV\MultiPrefix\XFRM\Entity\ResourceItem), '490fb3de2d9e182...', Array)
#8 [internal function]: cv6\CustomFields\XF\CustomField\Definition->getCustomImageData(Object(SV\MultiPrefix\XFRM\Entity\ResourceItem))
#9 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#10 internal_data/code_cache/templates/l3/s3/public/cv6_custom_fields_macros.php(23): XF\Template\Templater->method(Object(cv6\CustomFields\XF\CustomField\Definition), 'getCustomImageD...', Array)
#11 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#12 internal_data/code_cache/templates/l3/s3/public/custom_fields_macros.php(664): XF\Template\Templater->callMacro('cv6_custom_fiel...', 'custom_fields_e...', Array, Array)
#13 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#14 internal_data/code_cache/templates/l3/s3/public/custom_fields_macros.php(229): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_e...', Array, Array)
#15 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#16 internal_data/code_cache/templates/l3/s3/public/xfrm_resource_edit.php(66): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_e...', Array, Array)
#17 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(XFA\RMMarketplace\XF\Template\Templater), Array, NULL)
#18 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('xfrm_resource_e...', Array)
#19 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#20 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:ResourceItem...', 'public:xfrm_res...', Array)
#21 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#22 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#23 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#24 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#25 src/XF.php(488): XF\App->run()
#26 index.php(20): XF::runApp('XF\\Pub\\App')
#27 {main}
I think the author never appeared :(, does anyone else have this problem?
 
The error says: Unknown column 'xf_cv6_custom_image.content_id' - does the column exist in your database?
Do you install this addon and the core addon from @Hoffi?

I use it since it was beta, and havn't had such a problem.
 
I'm seeing the same issue with the image upload field as the other members mentioned above. There's no button to select the image when starting a thread. Here's a screencap:

1690825892373.webp


Here's an excerpt from the error in my admincp. Please let me know if it's helpful to post the whole error.
XF\Db\Exception: Macro public:cv6_custom_fields_macros :: custom_fields_edit_image() error: MySQL statement prepare error [1054]: Unknown column 'xf_cv6_custom_image.content_id' in 'where clause' src/XF/Db/AbstractStatement.php:230
 
Top Bottom