Imports Aren't Running Automatically
If you've got your import(s) setup but they aren't running automatically it's likely that WordPress cron events are firing. It's also possible that none of WordPress's cron events are firing, not just Property Hive's, so it's worth resolving this. To check this you can:
i) Install the plugin WP-Crontrol.
ii) Navigate to 'Tools > Cron Events'.
iii) If cron events aren't firing you'll see a red warning/error displayed and the reason. Normally this is a server configuration change required such as enabling cURL or similar. An alternative is use Alternative Cron or a Linux cron job.
Getting automated tasks running is not just good for getting the imports running, but also means other WordPress automated tasks are executed as these perform a variety of tasks (clean up old revisions etc).
Imports are Timing Out
The time taken to run an import depends on a number of factors:
- The format being used
- The number of properties
- Is it the first time the import has ran
- The number of new or updated media
The first time an import runs it will always take longer as it needs to import all images and other media for the first time. Subsequent imports will process a lot quicker as as only new or updated media will then be imported.
If an import is timing out you generally have one of two options:
Option 1: Increase timeout settings on the server
There are settings on the server to force a script to cease running after it's been going for, by default, 30 seconds. The most common setting is a PHP setting called max_execution_time. If you're not shared hosting this can normally be increased by your hosting company.
Option 2: Re-run the import manually until complete
If it is the first time you're running the import, and the timeout settings on the server cannot be changed, the only real option is to manually click 'Run Now', wait for the import to timeout, click 'Run Now' again, and so forth until all properties are imported. It will get a bit further each time as media gets imported. Although not the preferred option, some users are on shared hosting where the timeout settings on the server cannot be changed.
Option 3: Store media as URLs
As it's the importing of the photos, floorplans and brochures etc which takes the time, you can choose to store media as URLs instead as opposed to physically downloading them. You can control this under 'Property Hive > Settings > General > Miscellaneous'.
As mentioned it's only really the first import that will take a significant amount of time. Subsequent imports should complete in a matter of seconds and therefore not have this timeout issue.
Property Types and Other Custom Fields Aren't Getting Mapped
When setting up an import, step 2 will allow you to map all of the custom fields from the third party to the values you have in Property Hive. The list provided is the default list or just a few examples. The client might have customised these further so they could've changed from this list provided.
The logs will show if there are any values received which aren't mapped. It will say for example:
Property received with a type (Office) that is not mapped
In this scenario you can click the blue 'Add Additional Mapping' link during the mapping phase and add any additional options.
Duplicate copies of the images are being imported
Most of the time this is down to the fact you might be using an image optimisation plugin. For some of the formats (i.e. BLM) we check the filesize of the images being received against the filesize of the image we already have on file. If they're the same we assume the image hasn't changed and don't import it again. If they're different we assume it's a new image and import it.
If you're using an image optimisation plugin this will change the filesize of the photos imported so next time an image gets checked it will think it's a new image. You either need to deactivate the image optimisation plugin, or use a plugin which allows you to specify which post types image optimisation should take place against and untick the 'property' post type. We have seen this feature in image optimisation plugins before but can't, at this time, recall which ones. We'll update this documentation as we come across it again.