[TH] Custom Fields [Deleted]

Any idea how do I go past this error. I tried uninstalling, resinstalling

Code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column 'custom_post_fields' in 'field list' - library/Zend/Db/Statement/Mysqli.php:77
Generated By: Pseudo Admin, A moment ago
Stack Trace
#0 /home/techencl/public_html/community/library/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('INSERT INTO `xf...')
#1 /home/techencl/public_html/community/library/Zend/Db/Adapter/Mysqli.php(381): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO `xf...')
#2 /home/techencl/public_html/community/library/Zend/Db/Adapter/Abstract.php(478): Zend_Db_Adapter_Mysqli->prepare('INSERT INTO `xf...')
#3 /home/techencl/public_html/community/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `xf...', Array)
#4 /home/techencl/public_html/community/library/XenForo/DataWriter.php(1624): Zend_Db_Adapter_Abstract->insert('xf_post', Array)
#5 /home/techencl/public_html/community/library/XenForo/DataWriter.php(1613): XenForo_DataWriter->_insert()
#6 /home/techencl/public_html/community/library/XenForo/DataWriter.php(1405): XenForo_DataWriter->_save()
#7 /home/techencl/public_html/community/library/XenForo/ControllerPublic/Thread.php(549): XenForo_DataWriter->save()
#8 /home/techencl/public_html/community/library/Waindigo/CustomFields/Extend/XenForo/ControllerPublic/Thread.php(167): XenForo_ControllerPublic_Thread->actionAddReply()
#9 /home/techencl/public_html/community/library/DoublePost/ControllerPublic/Thread.php(40): Waindigo_CustomFields_Extend_XenForo_ControllerPublic_Thread->actionAddReply()
#10 /home/techencl/public_html/community/library/XenForo/FrontController.php(347): DoublePost_ControllerPublic_Thread->actionAddReply()
#11 /home/techencl/public_html/community/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#12 /home/techencl/public_html/community/index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
  ["url"] => string(96) "http://www.techenclave.com/community/threads/forum-software-upgrade-on-saturday.146243/add-reply"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(9) {
    ["message_html"] => string(46) "<p>Will look into the mobile theme logo.</p>
"
    ["_xfRelativeResolver"] => string(93) "http://www.techenclave.com/community/threads/forum-software-upgrade-on-saturday.146243/page-5"
    ["attachment_hash"] => string(32) "6478e976c8141df86fb1cb6740a548de"
    ["last_date"] => string(10) "1394694347"
    ["last_known_date"] => string(10) "1394694347"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(67) "/community/threads/forum-software-upgrade-on-saturday.146243/page-5"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
You could try creating the missing column manually. Run the following SQL code:
Code:
ALTER TABLE xf_post ADD custom_post_fields MEDIUMBLOB

This can be a very time-consuming query on large sites, which is probably why it seems to have failed to run on your site. In the next update to Custom Fields, we will be removing the post fields functionality which requires this query and moving it into a separate Custom Post Fields add-on which can then be optionally installed.
 
You could try creating the missing column manually. Run the following SQL code:
Code:
ALTER TABLE xf_post ADD custom_post_fields MEDIUMBLOB
I just checked in phpmyadmin and that column is already created.

PS: the add-on is currently uninstalled. Does the column not get removed when we uninstall?
 
Last edited:
Alright I got to the bottom of it finally and it is working now. First problem is that the file transfer from FTP is an issue for 4 files. The same 4 files each time. So I transferred the zipped file and unzipped on the server itself.

Next is that custom_post_field column. The add-on install completes but the column creation takes a long time. During that time all posts that are made wait in the queue for the table lock to be released. Meanwhile for users it seems as if the forum is not responding while posting. So all I had to do after the install was to wait for a good 10 minutes before everything started working.

PS: Deleting that column takes almost 15 or more minutes.

:sleep:
 
Waindigo updated Custom Fields by Waindigo with a new update entry:

Version 2.0.0 released

New features:
  • Added ability to search threads on custom thread fields.
  • Added ability to search users on custom user fields (requires User Search by Waindigo).
  • Added ability to search resources on custom resource fields (requires XenForo Resource Manager).
  • Removed Custom Post Fields, to be re-released as a separate add-on, to improve support for larger sites.
Bug fixes:...

Read the rest of this update entry...
 
Sorry. I will be releasing Custom Post Fields by Waindigo shortly. I assume you won't be wanting to install it though?
 
I'd like to give our users the ability, when submitting a resource, to add up to 3 member names to the resource (via custom fields) who will act as representatives for that resource. They would simply enter the username in the field and that username would then be displayed on the resource. Ideally I'd like it to work similar to the XF search function where it autofills the member name. I'll customize the output to display a link to the member's profile.
Does anyone else have a need for this? Would anyone want to share in the cost for the development? I've got a quote for it from Waindigo. He's going to create a custom PHP callback to achieve what I explained above.
 
Damn I probably shouldve waited more than 30 seconds after you released it before I installed it. Anyway, does the star ratings field still work with this?
 
And I am confused... How is this searchable. I see a search field in advanced but it doesnt let me only search for that. It says I have to also search for something in the main bar? Is that right?
 
Would it be possible to get search options in a sidebar in the forum which has custom fields. This way users can filter the threads based on custom fields from the forum view itself.

If it is possible, anyone interested in contributing for this feature?
 
Hi dude,

Here is a mockup of what I need it to do.



This is the thread creation page with a custom thread field for inputting a url.

step1.png





This is what it normally does in Social Groups. Basically it works as it should normally.

step2.png





This is what I need it to do.

step3.png



I would appreciate any help dude :)
 
Last edited:
Hi dude,

Here is a mockup of what I need it to do.



This is the thread creation page with a custom thread field for inputting a url.

step1.png





This is what it normally does in Social Groups. Basically it works as it should normally.

step2.png





This is what I need it to do.

step3.png



I would appreciate any help dude :)
You've set up the the custom field. You just need to make a quick template edit (or create an add-on and make a template modification).

In the template thread_list_item replace:
HTML:
                   <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                    class="{xen:if $thread.hasPreview, PreviewTooltip}"
                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">
with:
Rich (BB code):
            <xen:if is="{$thread.customFields.FIELD_ID}">
                <a href="{$thread.customFields.FIELD_ID}">
            <xen:else />
                <a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                    class="{xen:if $thread.hasPreview, PreviewTooltip}"
                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">
                </xen:if>
Replacing FIELD_ID with the ID of the field.

Also, in the same template, after <div class="secondRow"> add:
HTML:
<div class="pairsInline">
    <dl>
        <dt>Link:</dt>
        <dd><a href="{xen:link "threads{xen:if '{$thread.isNew} AND {$thread.haveReadData}', '/unread'}", $thread}"
                    title="{xen:if '{$thread.isNew} AND {$thread.haveReadData}', {xen:phrase go_to_first_unread_message}}"
                    class="{xen:if $thread.hasPreview, PreviewTooltip}"
                    data-previewUrl="{xen:if $thread.hasPreview, {xen:link threads/preview, $thread}}">Comments</a></dd>
    </dl>
</div>

I haven't actually tested this, but it should work.
 
Last edited:
Top Bottom