[TH] Custom Fields [Deleted]

However, we do plan to make an importer for this at some point

Can you say when? As mentioned a lot of people using this will be unable to upgrade until there is an importer.

Granted it is an addon you are not charging for, but after taking it over from another developer and announcing you won't be upgrading to v2, I believe there is a responsibility to not leave people in the lurch.
 
Can you say when? As mentioned a lot of people using this will be unable to upgrade until there is an importer.

Granted it is an addon you are not charging for, but after taking it over from another developer and announcing you won't be upgrading to v2, I believe there is a responsibility to not leave people in the lurch.
The add-on is open-source. We welcome any add-on developer to take it over outright or fork it. We did not build this add-on, we took it over from a different developer who abandoned the product. They asked us to because they wanted to do right by their customers. Only problem was these add-ons were in no fit state to continue developing.
 
I'd pay $50 for an importer, judging from the huge number of downloads for this I bet others would too.
 
Last edited:
Ideally they need to be imported into the core xenforo 2 custom thread fields.

If not then we at least need a way to convert them when possible to text within the first post of a thread.
Yeah I would need either of the two for me to be able to upgrade. This is one of the two add-ons holding me back right now.
 
Yeah I would need either of the two for me to be able to upgrade. .

I would settle for the option to just convert to text within the first post, if that is more realistic to develop. However I appreciate others may need importing into the xenforo fields, which i imagine is trickier.
 
We have completed an importer for XenForo 2 that will allow you to import your custom fields into the default system within XenForo. However, there are a few quirks that need to be addressed before running it:

  • The testing on this add-on has been limited to fields created by our team as well as a couple of people who use this add-on that have upgraded already, so there may be edge cases that were missed. We will try to address these if we can.
  • Some data, such as required state, is not imported due to the differences in the way this works between XenForo 2 and this add-on
  • If any of your custom fields use either a callback or regular expression for validation the field will be reset to have no validation, so you will need to recreate your regular expression or PHP callback once you run the importer. This is due to the differences in the way XenForo 2 handles regular expression validations.

Please do test this on a clone of your site before running the upgrade on your actual database, and as always make sure you do keep backups in case of something not going quite right.
 

Attachments

Did a quick testrun. Got an Oops error invalid
It seems as it has imported all the custom fields (18).
If I use the back button in the browser I see a glimpse of:
Importing...
Step 2 of 2: Custom thread field values - 93,75%

I am trying to look at the database now, but not exactly sure what to look for.
I have about 25000 imported rows in field_value, many of them seemes empty.
The old field_value have more than 50000 rows
I have 18 imported field.

I have used Custom thread fields mostly for classifieds and many, many of the threads are deleted now.
There is so few left that I actually was thinking of copy pasting it in by hand.
 
Can you check your XenForo error log to see if it shows anything? The records for deleted threads were kept in this add-on, but we do not import them if the associated thread doesn't exist, so that would account for having less records. Also, even if someone didn't fill in the field that empty value would have been imported, so some empty fields are to be expected.
 
Nothing in the server error log and nothing except the 18 fields in the import log.
I should have less than 600 threads that uses custom thread fields.
 
Tested a CLI import with only the values:
Code:
Starting import from [TH] Custom Fields (Beta)...
 - Step 1 of 1: Custom thread field values - 93,75%
                          
  [XF\PrintableException] 
  invalid                 
                          

xf:import

Now I got something in the Server error log:
Code:
Server error log

XF\PrintableException: invalid src/XF/Mvc/Entity/Entity.php:1083
Generated by: Okänt konto 21 Dec 2017 kl 09:18

Stack trace

#0 src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php(167): XF\Mvc\Entity\Entity->save()
#1 src/XF/Import/Runner.php(161): ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFieldValues(Object(XF\Import\StepState), Array, 8)
#2 src/XF/Import/Runner.php(75): XF\Import\Runner->runStep('threadFieldValu...', Object(XF\Import\StepState), 8)
#3 src/XF/Cli/Command/Import.php(64): XF\Import\Runner->run()
#4 src/vendor/symfony/console/Command/Command.php(242): XF\Cli\Command\Import->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 src/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 src/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Import), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 cmd.php(15): XF\Cli\Runner->run()
#10 {main}

Request state
array(4) {
  ["url"] => string(0) ""
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

All the custom thread fields are Single-line text box or Drop down selection. Values could have swedish åäöÅÄÖ in them.
I have run php cmd.php xf:convert-utf8mb4 just after upgrading to XF2
 
Tested a CLI import with only the values:
Code:
Starting import from [TH] Custom Fields (Beta)...
- Step 1 of 1: Custom thread field values - 93,75%
                         
  [XF\PrintableException]
  invalid                
                         

xf:import

Now I got something in the Server error log:
Code:
Server error log

XF\PrintableException: invalid src/XF/Mvc/Entity/Entity.php:1083
Generated by: Okänt konto 21 Dec 2017 kl 09:18

Stack trace

#0 src/addons/ThemeHouse/CustomFieldImporter/Import/Importer/XenForo1.php(167): XF\Mvc\Entity\Entity->save()
#1 src/XF/Import/Runner.php(161): ThemeHouse\CustomFieldImporter\Import\Importer\XenForo1->stepThreadFieldValues(Object(XF\Import\StepState), Array, 8)
#2 src/XF/Import/Runner.php(75): XF\Import\Runner->runStep('threadFieldValu...', Object(XF\Import\StepState), 8)
#3 src/XF/Cli/Command/Import.php(64): XF\Import\Runner->run()
#4 src/vendor/symfony/console/Command/Command.php(242): XF\Cli\Command\Import->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 src/vendor/symfony/console/Application.php(843): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 src/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRunCommand(Object(XF\Cli\Command\Import), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/XF/Cli/Runner.php(63): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 cmd.php(15): XF\Cli\Runner->run()
#10 {main}

Request state
array(4) {
  ["url"] => string(0) ""
  ["referrer"] => bool(false)
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

All the custom thread fields are Single-line text box or Drop down selection. Values could have swedish åäöÅÄÖ in them.
I have run php cmd.php xf:convert-utf8mb4 just after upgrading to XF2

Unfortunately that error isn't the most specific, let me have a look and see if I can replicate the issue :)

After import, I presume it’s safe to uninstall?

Yep, if you've confirmed everything worked correctly. Uninstalling it will remove the tables/fields for Waindigo's custom field add-on
 
Yep, safe to delete anything sufixed in __conflict for sure, not sure about custom_fields_log as that doesn't appear to be created by this add-on
 
Top Bottom