- This topic has 6 replies, 4 voices, and was last updated 5 years, 11 months ago by
tiberiur.
-
AuthorPosts
-
-
July 13, 2015 at 10:49 am #4005
lvloMemberHi guys!
I’m having troubles with repeatable group field which contains one “file” field and repeatable textarea:
- When I add new group – there is no “file” field.
- After saving the post repetable textareas looks like new group’s sections but not like part of group.
See attached images for more details.
How can I resolve this issue?
The code:
piklist( 'field', array( 'type' => 'group', 'field' => 'guide_section', 'add_more' => TRUE, 'label' => 'Секция', 'description' => '', 'template' => 'field', 'fields' => array( array( 'type' => 'file', 'field' => 'image', 'label'=> 'Фотография', 'description' => '', 'columns' => 4, 'options' => array( 'modal_title' => 'Добавить фотографию', 'button' => 'Добавить фотографию' ) ), array( 'type' => 'textarea', 'field' => 'description', 'label' => 'Описание шага', 'description' => '', 'add_more' => TRUE, 'columns' => 8 ), ) ) );Thank for your time!
Sergey
Attachments:
You must be logged in to view attached files. -
July 13, 2015 at 9:58 pm #4010
-
July 14, 2015 at 1:42 pm #4011
lvloMemberThank you for the reply @Steve.
Wish you good luck to find fixes for this and other issues!
Sergey
-
January 7, 2016 at 5:46 am #5517
r.cespaMember@Steve – Good morning and Happy New Year!
I’m using piklist in a project and I’m trying to set up a setting page using group fields, add_mores and file fields.
Basically there is a group Sliders containing slides; each slides contains a file field and four text fileds (title, subtitle, CallToAction text, URL).
I’m facing the same problem as lvlo and I was wondering if the bug has been fixed or if you or any user found a workaround.AFAIK the problem seems to be related to data serialization when saving to wp_options table: when saving data it creates an array for every single element but the array containing file information is “wrongly sized”; what I mean is that the first array (background of first slide) has one single element with index 0; the second array (background of second slide) has two (??) elements: the first one (index: 0) is set to undefined while the second one (index: 1) is set to image ID.
If I manually alter the serialized string and correct the anomaly, the page is displayed correctly until I add a new element. If I modify existing elements it still looks ok.Some information about my current setup:
WP 4.3.2 MultiSite
Piklist 0.9.4.29Correct serialized data:
a:1:{s:6:"slider";a:1:{s:5:"slide";a:2:{i:0;a:5:{s:10:"background";a:1:{i:0;a:1:{i:0;s:3:"456";}}s:8:"h1_title";a:1:{i:0;s:12:"Test Title 1";}s:8:"h2_title";a:1:{i:0;s:15:"Test Subtitle 1";}s:3:"cta";a:1:{i:0;s:5:"CTA 1";}s:7:"cta_url";a:1:{i:0;s:22:"http://www.example.com";}}i:1;a:5:{s:10:"background";a:1:{i:0;a:1:{i:0;s:3:"156";}}s:8:"h1_title";a:1:{i:0;s:12:"Test Title 2";}s:8:"h2_title";a:1:{i:0;s:15:"Test Subtitle 2";}s:3:"cta";a:1:{i:0;s:5:"CTA 2";}s:7:"cta_url";a:1:{i:0;s:23:"http://www2.example.com";}}}}}Wrong serialized data string (I added a third slide):
a:1:{s:6:"slider";a:1:{s:5:"slide";a:3:{i:0;a:5:{s:10:"background";a:1:{i:0;a:1:{i:0;s:3:"456";}}s:8:"h1_title";a:1:{i:0;s:12:"Test Title 1";}s:8:"h2_title";a:1:{i:0;s:15:"Test Subtitle 1";}s:3:"cta";a:1:{i:0;s:5:"CTA 1";}s:7:"cta_url";a:1:{i:0;s:22:"http://www.example.com";}}i:1;a:5:{s:10:"background";a:1:{i:1;a:1:{i:0;s:3:"156";}}s:8:"h1_title";a:1:{i:0;s:12:"Test Title 2";}s:8:"h2_title";a:1:{i:0;s:15:"Test Subtitle 2";}s:3:"cta";a:1:{i:0;s:5:"CTA 2";}s:7:"cta_url";a:1:{i:0;s:23:"http://www2.example.com";}}i:2;a:5:{<strong>s:10:"background";a:1:{i:2;a:2:{i:0;s:9:"undefined";i:1;s:3:"318";}</strong>}s:8:"h1_title";a:1:{i:0;s:12:"Test Title 3";}s:8:"h2_title";a:1:{i:0;s:15:"Test Subtitle 3";}s:3:"cta";a:1:{i:0;s:5:"CTA 3";}s:7:"cta_url";a:1:{i:0;s:23:"http://www3.example.com";}}}}}Ciao,
Roberto -
January 7, 2016 at 7:12 am #5518
r.cespaMemberOne more information: removing the file field solves the problem about wrong visualization but I noticed a new strange behavior.
I added a couple of slides to my slider group (without images, of course, only text fields). I saved the data and everything was fine.
I then added a third slide, saved the data and everything was fine.
I removed the third slide using the ” – ” button, I saved the data and I was presented with three slides with the third with empty fields: this looks partially correct to me because data was removed but I expected to see only two slides.Thanks,
Roberto -
January 7, 2016 at 10:33 am #5519
SteveKeymasterHi Roberto– This is still an issue and will be addresses in the next version of Piklist.
-
February 21, 2016 at 9:57 am #5977
tiberiurMember+1 here
Any updates with this issue?
Thank you.
-
-
AuthorPosts
- You must be logged in to reply to this topic.