{"id":2423,"date":"2024-10-10T11:17:30","date_gmt":"2024-10-10T05:17:30","guid":{"rendered":"https:\/\/directorist.com\/documentation\/?post_type=wpwax_directorist&#038;p=2423"},"modified":"2024-10-10T11:17:32","modified_gmt":"2024-10-10T05:17:32","slug":"how-to-fix-export-issues-in-directorist-default-import-export-tool","status":"publish","type":"wpwax_directorist","link":"https:\/\/directorist.com\/documentation\/directorist\/articles\/how-to-fix-export-issues-in-directorist-default-import-export-tool\/","title":{"rendered":"How to Fix Export Issues in Directorist Default Import\/Export Tool"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n\n\n<p>If you\u2019re experiencing issues with exporting listings using Directorist\u2019s default import\/export tool, a small code adjustment can resolve the problem. This guide will show you how to apply the fix.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Problem<\/h3>\n\n\n\n<p>Sometimes, the export function does not work as expected. The issue occurs when non-string data is processed incorrectly during export.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Solution<\/h3>\n\n\n\n<p>To fix this, you\u2019ll need to modify the <code>class-listings-export.php<\/code> file in Directorist by adding a few lines of code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Steps to Fix the Export Issue<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Locate the File:<\/strong> Using FTP or your hosting file manager, navigate to:<br><em><code><mark class=\"has-inline-color has-black-color\">\/wp-content\/plugins\/directorist\/includes\/classes\/class-listings-export.php<\/mark><\/code><\/em><\/li>\n\n\n\n<li><strong>Edit the File:<\/strong> Open the <code>class-listings-export.php<\/code> file and add the following code to ensure that only string data is processed during export:<br><code>if (! is_string($data)) { <br>    return $data; <br>}<\/code><\/li>\n\n\n\n<li><strong>Save the Changes:<\/strong> Once the code is added, save the file and re-upload it if necessary.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Image Reference<\/h3>\n\n\n\n<p><em>Example:<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"546\" src=\"https:\/\/directorist.com\/documentation\/wp-content\/uploads\/sites\/5\/2024\/10\/CleanShot-2024-10-10-at-11.15.57@2x-1024x546.png\" alt=\"\" class=\"wp-image-2425\" srcset=\"https:\/\/directorist.com\/documentation\/wp-content\/uploads\/sites\/5\/2024\/10\/CleanShot-2024-10-10-at-11.15.57@2x-1024x546.png 1024w, https:\/\/directorist.com\/documentation\/wp-content\/uploads\/sites\/5\/2024\/10\/CleanShot-2024-10-10-at-11.15.57@2x-300x160.png 300w, https:\/\/directorist.com\/documentation\/wp-content\/uploads\/sites\/5\/2024\/10\/CleanShot-2024-10-10-at-11.15.57@2x-768x409.png 768w, https:\/\/directorist.com\/documentation\/wp-content\/uploads\/sites\/5\/2024\/10\/CleanShot-2024-10-10-at-11.15.57@2x-1536x818.png 1536w, https:\/\/directorist.com\/documentation\/wp-content\/uploads\/sites\/5\/2024\/10\/CleanShot-2024-10-10-at-11.15.57@2x.png 1601w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator aligncenter has-alpha-channel-opacity\" \/>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>By making this simple code adjustment, the export issue will be resolved. For further assistance, feel free to contact support.<\/p>\n","protected":false},"author":10908,"parent":0,"menu_order":0,"template":"","class_list":["post-2423","wpwax_directorist","type-wpwax_directorist","status-publish","hentry","wpwax_directorist_category-articles"],"acf":[],"_links":{"self":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/wpwax_directorist\/2423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/wpwax_directorist"}],"about":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/types\/wpwax_directorist"}],"author":[{"embeddable":true,"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/users\/10908"}],"wp:attachment":[{"href":"https:\/\/directorist.com\/documentation\/wp-json\/wp\/v2\/media?parent=2423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}