- This topic has 4 replies, 2 voices, and was last updated 13 years, 10 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘How do I …’ is closed to new topics and replies.
Events Made Easy › Forums › How do I … › Custom event attributes disappear after server move
Tagged: event attributes, export
If you change the content, also change the sizes. Here you changed the url, but you neglected to change the size indicator “s:80” to match the new size (I’m guessing it should be “s:72”)
Right, OK.
I manually updated the size indicators on one record to match the actual length of the URL, and my custom attributes are now behaving as expected for that event.
Is there any way to update these size indicators automatically? As the image filename lengths are not all consistent, the size indicators will be different for each event — I guess I need all of them to be 8 less than their current values.
I have found a workaround, but I don’t really like it: using a find/replace to add some extra spaces (in my case, eight) to the beginning of the URL as it appears in the “event_attributes” column.
a:3:{s:11:"Event Image";s:80:"[eight spaces here]http://serialspace.dev/wp-content/uploads/2011/05/electrofringe2008.jpg";s:15:"Event Thumbnail";s:87:"[eight spaces here]http://serialspace.dev/wp-content/uploads/2011/05/electrofringe2008-248x248.jpg";s:13:"Cost/Donation";s:4:"free";}
(edit — the extra spaces are stripped out by bbpress — I have used [eight spaces here] instead.
It’s a php serializing standard, you need to follow it if you manually change things. So no autmatically updating possible. Best thing to do is to calculate the length of the string and replace things with a script.