Skip Navigation

[Closed] Types 1.6 update breaks layout that worked in Types 1.5.7

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 13 replies, has 2 voices.

Last updated by Luo Yang 6 years ago.

Assigned support staff: Luo Yang.

Author
Posts
#238178

Types 1.6 produced layout changes from Types 1.5.7. It looks like wpautop is causing extra tags despite output mode set to manual paragraphs. The problem seems to affect shortcodes that are called within a content template. I reverted back to Types 1.5.7 to resolve the problem for now. Is this behavior expected? If so, how can I work around the problem? If not, will you provide an update to resolve the problem? Thanks.

#238503

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hi Brad,

Could you take a screenshots for your content template and describe detail steps to duplicate same problem?
I need debug it in my localhost, thanks

#238547

Hi Luoy,

I made screenshots of the html and display for both Types 1.5.7 and Types 1.6. Also a screenshot of the content template that is the same one used in both sets of screenshots.

As you will see by looking at the differences in html, the Types 1.6 is messing up the tags, adding extra <p> and putting </span> in the wrong place.

See below the cbfirstline function used by a shortcode within the content template to create the markup. It works fine as desired in Types 1.5.7 and prior versions but not correctly in Types 1.6.

function cbfirstline($atts, $content = null) {
extract(shortcode_atts(array(
'class' => null,
'style' => null,
), $atts));
if($content != "") {
$format = "";
if ($class != null) {$format.=' class="'.$class.'"';}
if ($style != null) {$format.=' style="'.$style.'"';}
$temp = do_shortcode($content);
$temp = explode("\n",$temp);
$temp[0] = '<span '.$format.'>'.$temp[0].'</span>';
$result = implode("\n",$temp);
}
return $result;
}
add_shortcode('cbfirstline','cbfirstline');

Thanks.

Brad

#238741

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Is the custom field "wpdnr-authority" a Multiple lines field created with Types?
Please try edit the content template:
hidden link

Modify the shortcode from:
[types field="wpdnr-authority" ...][/types]
To:
[types field="wpdnr-authority" output="raw" ...][/types]

More help:
output:
'raw' | 'html' | 'normal'(default)
‘raw’=display raw data stored in DB, ‘html’=wrap data in HTML
https://toolset.com/documentation/functions/#tf-145186

#238802

Yes, the custom field "wpdnr-authority" is a Multiple lines field created with Types.

Using Types 1.6, when I change the content template to

[types field="wpdnr-authority" output="raw" ...][/types]

the resulting output differs from the Types 1.5.7 output; it is missing the <br> at the end of each line. See attached screenshot.

Using the output="raw" will let me work around the different behavior of Types 1.6 and Types 1.5.7. However, I would understandably rather not rewrite my content to accommodate different Types behavior. I would prefer for Types 1.6 to behave the same as Types 1.5.7 in the way that it produces output.

Will the output behavior of Types 1.6 be restored to function as it did in Types 1.5.7 or do I need to change all of my content to accommodate a permanent change in the output behavior of the Types plugin?

Thank you.

#239091

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I put it into our to-do list, forward your question to our developers, will feedback if there is any news.

#242309

Hi Luoy,

This issue is resolved by the development version as described at https://toolset.com/forums/topic/output-adding-extra-p-tags-only-since-upgrading-new-types-plugin/.

This topic will be resolved with the next release version, at which time I will close the topic.

Brad

#242406

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the feedback, I am not sure when will release next version, I guess it should be weeks.

#244127

Hi Luo,

I found a problem in the development version. See my notes at https://toolset.com/forums/topic/output-adding-extra-p-tags-only-since-upgrading-new-types-plugin/#post-244121.

For now I reverted back to Types 1.5.7 which does not put in extra <p> tags and does not cause the new problem described in my note.

Brad

#244273

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Are we talking about the problem "The problem is that a filename such as "sp_Profile.png" is being changed to "sp-Profile.png" in the HTML when the page is displayed",
It does change file name from "sp_Profile.png" to "sp-Profile.png", but I can not duplicate same problem "when the page is displayed, resulting in a 404 error on that image file",
hidden link
user/pass: xgren/111111

Could you duplicate same problem in above test site:

#244375

Yes, that is the problem. Did you see the problem on my development site? I used the Chrome console to see the 404 errors.
If you want to recreate the problem on your site you will need to install the Simple Press forum plugin. Then you would still not have my exact forum configuration, so might see different results.
I can provide you access to my development site, or I can make a backup of the site and provide that to you. You could then have the database and files exactly as I have.
Let me know if you'd like me to email you login credentials to my development site or if you want me to make a backup and send you a link to download that, or both.

#244531

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the feedback, I agree that there should be problem that Types change the file name, and I put it into our to-do list, our developers will take care of it

#244564

OK, thanks. I'll be happy to test the fix when it's ready.

#244936

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

our developers are working on it, will feedback if there is any news.

The topic ‘[Closed] Types 1.6 update breaks layout that worked in Types 1.5.7’ is closed to new replies.