pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Bulleted Lists From WYSIWYG Field Not Displaying Properly #1635

Closed Shelob9 closed 8 years ago

Shelob9 commented 11 years ago

User in this issue reports that bulleted lists created in a WYSIWYG field are not displaying with the proper formatting.

mldunham commented 11 years ago

In addition - the same is true of bulleted lists inserted directly in the template. They do not display as lists, only as separate lines of text.

A fix or a work-around is acceptable for now. I don't know a good alternative at the moment. (user in mentioned thread).

sc0ttkclark commented 11 years ago

In the field settings 'Additional Field Options' tab, where it allows HTML, does it have those HTML tags whitelisted?

mldunham commented 11 years ago

What is the correct way to list allowed tags? I've tried: ul,li,h2,h4 and tags with markup < > The result is no tags are read from the field. At the moment, all tags are being read except lists. Do I have to list all tags that might be used if I whitelist?

Also, since the template itself won't accept list tags, it appears this is a wider issue.

sc0ttkclark commented 11 years ago

ul li h2 h4 format, but I'll be committing a new patch that will automatically handle comma separated or <tag> syntax as well.

mldunham commented 11 years ago

Sounds good, but trying it as you suggest, what it does is strip the formatting out of the field. Or at least that is what I am seeing. Since the field is formatted with the visual editor by the user, it would seem that there could be a setting to just embed the formatting as is. If I wanted to override I would think the best option would be to use small plain text fields and format them in the template. I'm trying to avoid that because this application is for technical job postings that include (ever changing) lists of skills.

sc0ttkclark commented 11 years ago

The allowed html tags option lets you specify which tags you want to allow. If you leave it empty, no tags will be removed and it should work entirely as expected for you. Let me know if you still have issues.

Also, how are you outputting this field in your template?

mldunham commented 11 years ago

That is how it is working in this case. If I do not specify any tags in the Allowed HTML tags field, the template I am using allows tags like headline, underline, strong, etc. to be passed through and parsed. The only one that does not pass through is lists (ul, li). Even if I specify lists in the Allowed HTML tags, lists are not displayed. They also will not parse if I put them directly in the template to show a couple of options for contacting HR about the referenced job. In short, lists do not parse in the implementation at all, whether they are part of a WSIWYG field or part of text included in the template to be shown in the displayed page. So far, they are the only tag that is not properly parsed.

sc0ttkclark commented 11 years ago

What other options do you have set for your 'Additional Field Options' tab on that field?

How are you outputting this field in your template?

mldunham commented 11 years ago

Additional Field Options TinyMCE Enable wptexturize enable convert_chars enable wpautop Advanced - No options

In Template the fields are being displayed with (paragraph tag) {@requirements} (close paragraph tag)

To display a bulleted field in the template we're using standard HTML:

Please use the form on the right side of the page:

Which, of course, works in this comment - but doesn't when I use the same code in the template. It displays the headline, and the lines of text, but no indents and no bullet.

pglewis commented 11 years ago

I've tested a wysiwyg field added to the standard Post object and output it using shortcodes with the expected results.

  1. What type of Pod is this
  2. Can you paste your template code into a pastbin/gist
  3. How is the template being inserted into your page?

With this information I can try to reproduce your situation.

pglewis commented 11 years ago

A couple other thoughts you might check on your end:

  1. Disable all other non-essential plugins to help rule out external conflicts
  2. Try using one of the core WordPress themes if possible, to rule out a theme conflict
  3. Try inserting a bulleted list into a test post, in the regular content box to see if this is a global issue with markup in TinyMCE or limited to the ones Pods is creating.
pglewis commented 8 years ago

Another one that never reproduced and has gone open a long time without any further information.