وردپرس

Undesired data added to meta_value during or after import


Hi there. I’m having an issue with imports of a certain type of data into meta_value fields. It’s a field from a custom post type. I include the field in my import via the “Create WP Custom Fields” area in this plug-in. On of my .csv columns contains data such as the following:

a:1:{i:0;a:2:{s:4:"name";s:21:"Link title here";s:3:"url";s:31:"/url-goes-here/";}}

After importing, something along the lines of “s:103” is added to the beginning of this value, making it:

s:103:"a:1:{i:0;a:2:{s:4:"name";s:21:"Link title here";s:3:"url";s:31:"/url-goes-here/";}}"

I’m not 100% sure if this is a PHP setting on my server doing this, Ultimate CSV Importer, or something else. I’m hoping someone can give me some pointers here. The main problem is that, with “s:103” added, the post is broken and throws the error, “Cannot access offset of type string on strong __file/path/here”. If I go into the database meta_value and remove the “s:103” the error goes away and the post works as intended, along with the imported data from this field.

این خبر را در ایران وب سازان مرجع وب و فناوری دنبال کنید

مشاهده پاسخ های این مطلب
———————————————
این مطلب از سایت انجمن وردپرس گردآوری شده است و کلیه حقوق مطلق به انجمن وردپرس می باشد در صورت مغایرت و یا بروز مشکل اطلاع دهید تا حذف گردد

منبع: انجمن وردپرس

دکمه بازگشت به بالا