0ptima
Well-known member
Can custom thread fields be required before submitting the thread? Can the rest of the editor be removed on the new thread page on forums this is enabled in so you can only fill the fields in? Thanks.
1. Yes
2. No
Can custom thread fields be required before submitting the thread? Can the rest of the editor be removed on the new thread page on forums this is enabled in so you can only fill the fields in? Thanks.
It is not currently possible to remove the editor completely. This has been suggested several times but never implemented. Drop me a PM if you'd be interested in this.Can custom thread fields be required before submitting the thread? Can the rest of the editor be removed on the new thread page on forums this is enabled in so you can only fill the fields in? Thanks.
This is a problem with the way XenForo caches custom fields. Rebuilding caches may help, but otherwise there is not much can be done about this.Two issues - I've created and deleted a couple of custom user fields, but they're not actually gone - they export when I export data with the search and export tool. I'd like to actually be rid of them.
Screenshot?Also, for custom thread fields, we're having some users who aren't able to edit (they have permissions - the overlay is taking their whole screen and they can't actually scroll or navigate). Any ideas?
This is a problem with the way XenForo caches custom fields. Rebuilding caches may help, but otherwise there is not much can be done about this.
Server Error
Mysqli prepare error: Table 'pijanitv_xenforo2.xf_resource_field_category' doesn't exist
Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in XenForo/Model.php at line 219
XenForo_Model->fetchAllKeyed() in XenResource/Model/ResourceField.php at line 78
XenResource_Model_ResourceField->getResourceFields() in XenResource/Model/ResourceField.php at line 55
XenResource_Model_ResourceField->getResourceFieldsForEdit() in XenResource/ControllerPublic/Resource.php at line 738
XenResource_ControllerPublic_Resource->_getResourceAddOrEditResponse() in XenResource/ControllerPublic/Resource.php at line 858
XenResource_ControllerPublic_Resource->actionEdit() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /home/pijanitv/public_html/index.php at line 13
Server Error Log
Error Info
ErrorException: Undefined index: prefix_cache - library/XenResource/ControllerPublic/Resource.php:493
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /home/pijanitv/public_html/library/XenResource/ControllerPublic/Resource.php(493): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/pijanitv/...', 493, Array)
#1 /home/pijanitv/public_html/library/XenResource/ControllerPublic/Resource.php(155): XenResource_ControllerPublic_Resource->_displayFilterOptions(Array, Array)
#2 /home/pijanitv/public_html/library/*******/SearchResourceName/ControllerPublic/Resource.php(21): XenResource_ControllerPublic_Resource->actionIndex()
#3 /home/pijanitv/public_html/library/*******/FilterResourceAuthor/ControllerPublic/Resource.php(41): *******_SearchResourceName_ControllerPublic_Resource->actionIndex()
#4 /home/pijanitv/public_html/library/*******/ResourcesPagination/ControllerPublic/Resource.php(12): *******_FilterResourceAuthor_ControllerPublic_Resource->actionIndex()
#5 /home/pijanitv/public_html/library/FireDaemon/ResourceManager/ViewCount/ControllerPublic/Resource.php(7): *******_ResourcesPagination_ControllerPublic_Resource->actionIndex()
#6 /home/pijanitv/public_html/library/XenForo/FrontController.php(347): FireDaemon_ResourceManager_ViewCount_ControllerPublic_Resource->actionIndex()
#7 /home/pijanitv/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/pijanitv/public_html/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
["url"] => string(83) "http://www.pijanitvor.com/index.php?resources/&order=rating_weighted&begin=U&page=4"
["_GET"] => array(4) {
["resources/"] => string(0) ""
["order"] => string(15) "rating_weighted"
["begin"] => string(1) "U"
["page"] => string(1) "4"
}
["_POST"] => array(0) {
}
}
Server Error Log
Error Info
ErrorException: Undefined index: featured_count - library/XenResource/Model/Category.php:503
Generated By: Unknown Account, 2 minutes ago
Stack Trace
#0 /home/pijanitv/public_html/library/XenResource/Model/Category.php(503): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/pijanitv/...', 503, Array)
#1 /home/pijanitv/public_html/library/XenResource/Model/Category.php(474): XenResource_Model_Category->_applyRecursiveCountsToGrouped(Array, 0)
#2 /home/pijanitv/public_html/library/XenResource/ControllerPublic/Resource.php(67): XenResource_Model_Category->applyRecursiveCountsToGrouped(Array)
#3 /home/pijanitv/public_html/library/*******/SearchResourceName/ControllerPublic/Resource.php(21): XenResource_ControllerPublic_Resource->actionIndex()
#4 /home/pijanitv/public_html/library/*******/FilterResourceAuthor/ControllerPublic/Resource.php(41): *******_SearchResourceName_ControllerPublic_Resource->actionIndex()
#5 /home/pijanitv/public_html/library/*******/ResourcesPagination/ControllerPublic/Resource.php(12): *******_FilterResourceAuthor_ControllerPublic_Resource->actionIndex()
#6 /home/pijanitv/public_html/library/FireDaemon/ResourceManager/ViewCount/ControllerPublic/Resource.php(7): *******_ResourcesPagination_ControllerPublic_Resource->actionIndex()
#7 /home/pijanitv/public_html/library/XenForo/FrontController.php(347): FireDaemon_ResourceManager_ViewCount_ControllerPublic_Resource->actionIndex()
#8 /home/pijanitv/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#9 /home/pijanitv/public_html/index.php(13): XenForo_FrontController->run()
#10 {main}
Request State
array(3) {
["url"] => string(83) "http://www.pijanitvor.com/index.php?resources/&order=download_count&begin=E&page=20"
["_GET"] => array(4) {
["resources/"] => string(0) ""
["order"] => string(14) "download_count"
["begin"] => string(1) "E"
["page"] => string(2) "20"
}
["_POST"] => array(0) {
}
}
Server Error Log
Error Info
ErrorException: Undefined index: featured_count - library/XenResource/ControllerPublic/Resource.php:89
Generated By: Unknown Account, A moment ago
Stack Trace
#0 /home/pijanitv/public_html/library/XenResource/ControllerPublic/Resource.php(89): XenForo_Application::handlePhpError(8, 'Undefined index...', '/home/pijanitv/...', 89, Array)
#1 /home/pijanitv/public_html/library/*******/SearchResourceName/ControllerPublic/Resource.php(21): XenResource_ControllerPublic_Resource->actionIndex()
#2 /home/pijanitv/public_html/library/*******/FilterResourceAuthor/ControllerPublic/Resource.php(41): *******_SearchResourceName_ControllerPublic_Resource->actionIndex()
#3 /home/pijanitv/public_html/library/*******/ResourcesPagination/ControllerPublic/Resource.php(12): *******_FilterResourceAuthor_ControllerPublic_Resource->actionIndex()
#4 /home/pijanitv/public_html/library/FireDaemon/ResourceManager/ViewCount/ControllerPublic/Resource.php(7): *******_ResourcesPagination_ControllerPublic_Resource->actionIndex()
#5 /home/pijanitv/public_html/library/XenForo/FrontController.php(347): FireDaemon_ResourceManager_ViewCount_ControllerPublic_Resource->actionIndex()
#6 /home/pijanitv/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#7 /home/pijanitv/public_html/index.php(13): XenForo_FrontController->run()
#8 {main}
Request State
array(3) {
["url"] => string(83) "http://www.pijanitvor.com/index.php?resources/&order=rating_weighted&begin=U&page=4"
["_GET"] => array(4) {
["resources/"] => string(0) ""
["order"] => string(15) "rating_weighted"
["begin"] => string(1) "U"
["page"] => string(1) "4"
}
["_POST"] => array(0) {
}
}
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'featured_count' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Sunka, 21 minutes ago
Stack Trace
#0 /home/pijanitv/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('UPDATE `xf_reso...')
#1 /home/pijanitv/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'UPDATE `xf_reso...')
#2 /home/pijanitv/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('UPDATE `xf_reso...')
#3 /home/pijanitv/public_html/library/Zend/Db/Adapter/Abstract.php(632): Zend_Db_Adapter_Abstract->query('UPDATE `xf_reso...', Array)
#4 /home/pijanitv/public_html/library/XenForo/DataWriter.php(1640): Zend_Db_Adapter_Abstract->update('xf_resource_cat...', Array, 'resource_catego...')
#5 /home/pijanitv/public_html/library/XenForo/DataWriter.php(1609): XenForo_DataWriter->_update()
#6 /home/pijanitv/public_html/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#7 /home/pijanitv/public_html/library/XenResource/Deferred/Category.php(18): XenForo_DataWriter->save()
#8 /home/pijanitv/public_html/library/XenForo/Model/Deferred.php(256): XenResource_Deferred_Category->execute(Array, Array, 6.94161510468, '')
#9 /home/pijanitv/public_html/library/XenForo/Model/Deferred.php(390): XenForo_Model_Deferred->runDeferred(Array, 6.94161510468, '', false)
#10 /home/pijanitv/public_html/library/XenForo/Model/Deferred.php(335): XenForo_Model_Deferred->_runInternal(Array, 6.94161605835, '', false)
#11 /home/pijanitv/public_html/library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 6.94161605835)
#12 /home/pijanitv/public_html/library/XenForo/ViewRenderer/Json.php(147): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun()
#13 /home/pijanitv/public_html/library/XenForo/ViewRenderer/Json.php(185): XenForo_ViewRenderer_Json::_addDefaultParams(Array)
#14 /home/pijanitv/public_html/library/XenForo/ViewRenderer/Json.php(37): XenForo_ViewRenderer_Json::jsonEncodeForOutput(Array)
#15 /home/pijanitv/public_html/library/XenForo/FrontController.php(597): XenForo_ViewRenderer_Json->renderRedirect(4, 'http://www.pija...', NULL, Array)
#16 /home/pijanitv/public_html/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Redirect), Object(XenForo_ViewRenderer_Json), Array)
#17 /home/pijanitv/public_html/admin.php(13): XenForo_FrontController->run()
#18 {main}
Request State
array(3) {
["url"] => string(48) "http://www.pijanitvor.com/admin.php?phrases/save"
["_GET"] => array(1) {
["phrases/save"] => string(0) ""
}
["_POST"] => array(9) {
["title"] => string(22) "no_permission_to_reply"
["phrase_text"] => string(32) "Nemate ovlasti za pisanje ovdje!"
["addon_id"] => string(7) "XenForo"
["phrase_id"] => string(1) "0"
["language_id"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfRequestUri"] => string(43) "/admin.php?phrases/46589/edit&language_id=1"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'node_id' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Sunka, 11 minutes ago
Stack Trace
#0 /home/pijanitv/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `xf...')
#1 /home/pijanitv/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `xf...')
#2 /home/pijanitv/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `xf...')
#3 /home/pijanitv/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#4 /home/pijanitv/public_html/library/XenForo/Model/Post.php(1633): Zend_Db_Adapter_Abstract->insert('xf_post', Array)
#5 /home/pijanitv/public_html/library/XenForo/Model/Post.php(1471): XenForo_Model_Post->_copyPost(Array, Array, Array)
#6 /home/pijanitv/public_html/library/XenForo/Model/Post.php(1377): XenForo_Model_Post->_moveOrCopyPosts('copy', Array, Array, Array, Array)
#7 /home/pijanitv/public_html/library/XenForo/Model/InlineMod/Post.php(475): XenForo_Model_Post->copyPosts(Array, Array, Array, Array)
#8 /home/pijanitv/public_html/library/XenForo/Model/InlineMod/Post.php(419): XenForo_Model_InlineMod_Post->_moveOrCopyPosts('copy', Array, Array, Array, Array, NULL)
#9 /home/pijanitv/public_html/library/XenForo/ControllerPublic/InlineMod/Post.php(231): XenForo_Model_InlineMod_Post->copyPosts(Array, Array, NULL)
#10 /home/pijanitv/public_html/library/XenForo/ControllerPublic/InlineMod/Post.php(155): XenForo_ControllerPublic_InlineMod_Post->_moveOrCopyPostsAction('canCopyPosts', 'copyPosts', 'XenForo_ViewPub...', 'inline_mod_post...')
#11 /home/pijanitv/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_InlineMod_Post->actionCopy()
#12 /home/pijanitv/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#13 /home/pijanitv/public_html/index.php(13): XenForo_FrontController->run()
#14 {main}
Request State
array(3) {
["url"] => string(56) "http://www.pijanitvor.com/index.php?inline-mod/post/copy"
["_GET"] => array(2) {
["inline-mod/post/copy"] => string(0) ""
["threads/25314/"] => string(0) ""
}
["_POST"] => array(7) {
["thread_type"] => string(8) "existing"
["existing_url"] => string(50) "http://www.pijanitvor.com/index.php?threads/25314/"
["save"] => string(10) "Copy Posts"
["posts"] => array(1) {
[0] => string(6) "339873"
}
["_xfConfirm"] => string(1) "1"
["redirect"] => string(50) "http://www.pijanitvor.com/index.php?threads/25313/"
["_xfToken"] => string(8) "********"
}
}
But, when try to copy post from one thread to another, I have another server error. Could you tell me is that error conected with this your Mod (even if mod is disabled in acp).
Code:Server Error Log Error Info Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'node_id' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77 Generated By: Sunka, 11 minutes ago Stack Trace #0 /home/pijanitv/public_html/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `xf...') #1 /home/pijanitv/public_html/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `xf...') #2 /home/pijanitv/public_html/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `xf...') #3 /home/pijanitv/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array) #4 /home/pijanitv/public_html/library/XenForo/Model/Post.php(1633): Zend_Db_Adapter_Abstract->insert('xf_post', Array) #5 /home/pijanitv/public_html/library/XenForo/Model/Post.php(1471): XenForo_Model_Post->_copyPost(Array, Array, Array) #6 /home/pijanitv/public_html/library/XenForo/Model/Post.php(1377): XenForo_Model_Post->_moveOrCopyPosts('copy', Array, Array, Array, Array) #7 /home/pijanitv/public_html/library/XenForo/Model/InlineMod/Post.php(475): XenForo_Model_Post->copyPosts(Array, Array, Array, Array) #8 /home/pijanitv/public_html/library/XenForo/Model/InlineMod/Post.php(419): XenForo_Model_InlineMod_Post->_moveOrCopyPosts('copy', Array, Array, Array, Array, NULL) #9 /home/pijanitv/public_html/library/XenForo/ControllerPublic/InlineMod/Post.php(231): XenForo_Model_InlineMod_Post->copyPosts(Array, Array, NULL) #10 /home/pijanitv/public_html/library/XenForo/ControllerPublic/InlineMod/Post.php(155): XenForo_ControllerPublic_InlineMod_Post->_moveOrCopyPostsAction('canCopyPosts', 'copyPosts', 'XenForo_ViewPub...', 'inline_mod_post...') #11 /home/pijanitv/public_html/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_InlineMod_Post->actionCopy() #12 /home/pijanitv/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch)) #13 /home/pijanitv/public_html/index.php(13): XenForo_FrontController->run() #14 {main} Request State array(3) { ["url"] => string(56) "http://www.pijanitvor.com/index.php?inline-mod/post/copy" ["_GET"] => array(2) { ["inline-mod/post/copy"] => string(0) "" ["threads/25314/"] => string(0) "" } ["_POST"] => array(7) { ["thread_type"] => string(8) "existing" ["existing_url"] => string(50) "http://www.pijanitvor.com/index.php?threads/25314/" ["save"] => string(10) "Copy Posts" ["posts"] => array(1) { [0] => string(6) "339873" } ["_xfConfirm"] => string(1) "1" ["redirect"] => string(50) "http://www.pijanitvor.com/index.php?threads/25313/" ["_xfToken"] => string(8) "********" } }
Hi,
thanks for your great add-on!
I need to import a custom field from vbulletin to xenForo. I created the custom fields from acp. And I have made a php script that reads from the vbulletin database and should write to the database of xenForo, but I saw that the column xf_thread.custom_fields is a blob and I did not understand how I should write this field. Can you tell me how I can write my custom fields strings in this blob column?
Thanks a lot.
Regards
$location = $thread['vbfield1'];
$price = $thread['vbfield2'];
$array = array("price" => $price,"location" => $location,);
$array = serialize($array);
$arrQuoted = $db->quote($array);
$db->query("
UPDATE xf_thread
SET custom_fields = {$arrQuoted}
WHERE thread_id = ? ", $newThreadId);
$fieldvalue = $thread['vbfield1'];
$field_id = "location"; // xf custom field name
$db->query(
'
INSERT INTO xf_thread_field_value
(thread_id, field_id, field_value)
VALUES
(?, ?, ?)
ON DUPLICATE KEY UPDATE
field_value = VALUES(field_value)
',
array(
$newThreadId,
$field_id,
$fieldvalue
));
$fieldvalue = $thread['vbfield2'];
$field_id = "price"; // xf custom field name
$db->query(
'
INSERT INTO xf_thread_field_value
(thread_id, field_id, field_value)
VALUES
(?, ?, ?)
ON DUPLICATE KEY UPDATE
field_value = VALUES(field_value)
',
array(
$newThreadId,
$field_id,
$fieldvalue
));
Sorry, if I have multiple choice custom field I make an array of arrays?You need to serialize the data.
$array = array("price" => $pricearray,"location" => $locationarray,);
We use essential cookies to make this site work, and optional cookies to enhance your experience.