Tagged: post-relate
- This topic has 12 replies, 3 voices, and was last updated 8 years ago by
chan.
-
AuthorPosts
-
-
September 20, 2013 at 9:14 pm #1102
prestonMemberI have a post-relate field working with custom post types on my dev server, but the same setup on my production server gives me this error when saving the post.
Warning: substr_compare() [function.substr-compare]: The length cannot exceed initial string length in /home/koavac/public_html/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1474 Warning: Cannot modify header information - headers already sent by (output started at /home/koavac/public_html/wp-content/plugins/piklist/includes/class-piklist-form.php:1474) in /home/koavac/public_html/wp-admin/post.php on line 222 Warning: Cannot modify header information - headers already sent by (output started at /home/koavac/public_html/wp-content/plugins/piklist/includes/class-piklist-form.php:1474) in /home/koavac/public_html/wp-includes/pluggable.php on line 875When I remove the post-relate meta box, no error. Any ideas?
WordPress 3.6.1
Piklist 0.8.0b5 -
September 20, 2013 at 9:35 pm #1103
SteveKeymasterCan you post your post-relate code?
-
September 21, 2013 at 1:18 pm #1104
prestonMember[theme]/piklist/parts/meta-boxes/location-related.php
<?php /* Title: Available Homes Post Type: location Order: 10 Priority: default Context: side Collapse: false */ piklist('field', array( 'type' => 'post-relate' ,'scope' => 'home' ,'template' => 'field' )); piklist('shared/code-locater', array( 'location' => __FILE__ ,'type' => 'Meta Box' )); -
September 21, 2013 at 10:57 pm #1105
SteveKeymasterTry
,'scope' => 'post' -
September 23, 2013 at 12:27 pm #1109
SteveKeymasterWe will be writing some documentation on “Scope”, but for now think of it as where you want the data to be saved: “post”, “post_meta”, etc.
-
September 25, 2013 at 4:28 pm #1135
prestonMember'scope' => 'post'changes the related items to posts.What I want to do here is related two custom post types, location and home.
-
September 25, 2013 at 4:37 pm #1136
prestonMemberSame error with 0.8.0b6, btw.
-
September 25, 2013 at 9:06 pm #1137
SteveKeymasterWe’re not seeing an error in Beta 6. I changed scope to piklist_demo and it worked fine:
piklist('field', array( 'type' => 'post-relate' ,'scope' => 'piklist_demo' ,'template' => 'field' ));Make sure your CPTs are registered and there is PUBLISHED content.
-
September 26, 2013 at 5:55 pm #1139
prestonMemberI confirmed the post types are registered and have published posts. I even re-created the posts to make sure they have clean meta data.
The odd thing is that this error only shows up on my production server, not my local dev server.
They are both running
PHP 5.2.17
WordPress 3.6.1
Piklist 0.8.0b6 -
September 26, 2013 at 6:02 pm #1140
prestonMemberI’m able to reproduce this with Piklist Demos as well.
1. Piklist Demos > Add New Piklist Demo
2. Give the post a title and click Save.
Warning: substr_compare() [function.substr-compare]: The length cannot exceed initial string length in /home/koavac/public_html/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1475 Warning: Cannot modify header information - headers already sent by (output started at /home/koavac/public_html/wp-content/plugins/piklist/includes/class-piklist-form.php:1475) in /home/koavac/public_html/wp-includes/pluggable.php on line 875 -
September 27, 2013 at 4:06 pm #1143
SteveKeymasterI tried reproducing a few setups and can’t. Please delete your current version of Piklist, and then download and install Beta 6 again.
-
September 27, 2013 at 4:28 pm #1145
prestonMemberThanks Steve,
I was still getting the error after deactivating, deleting, and re-installing the plugin.
I’m now using Posts 2 Posts for post relationships, which seems to work fine with piklist created custom post types.
-
-
AuthorPosts
- You must be logged in to reply to this topic.