• When I put text in field description and store it, then source code for this field in table look like this:
    <td id="desc"><i class="" aria-hidden="true"></i> <em class="">fffff</em></td>

    And when I click on Manage File and then click Update Document button, the code is changed to:

    <td id="desc"><i class="" aria-hidden="true"></i> <em class=""><p>fffff</p>
    </em></td>

    As you see, there is additional tag P inside EM after updating. In this case to the field Description applied different css style (with tag P and without tag P). May be you have some ideas how to fix this. Thank you!

    • This topic was modified 6 years, 8 months ago by Ivaseg.
    • This topic was modified 6 years, 8 months ago by Ivaseg. Reason: it's hard to write without text preview
Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author bhaldie

    (@bhaldie)

    looks like something like another plugin is injected p tags around any text. Try disabling all other plugins and see if the p tags is still injected.

    When I tested this on my server no p tag was added.

    Thread Starter Ivaseg

    (@ivaseg)

    I did it on WP where just your plugin active. I can record screen again if you want)

    Plugin Author bhaldie

    (@bhaldie)

    No, it okay Ill look into it

    Thread Starter Ivaseg

    (@ivaseg)

    This issue still exist ??

    By the way, can you remove unused html tags in table for fields that are empty. For example: if Description field is empty the source code is

    <td id="desc"><i class="" aria-hidden="true" title="Description"></i> <em class=""></em></td>

    As you see, <i> and <em> is useless here.

    Plugin Author bhaldie

    (@bhaldie)

    yeah ill take a look ??

    Plugin Author bhaldie

    (@bhaldie)

    this issue is resolved in version 3.8.6

    Thread Starter Ivaseg

    (@ivaseg)

    cheked both: not fixed

    Plugin Author bhaldie

    (@bhaldie)

    please make sure you clear your cache. The tags aren’t removed they just have data in them now.

    Plugin Author bhaldie

    (@bhaldie)

    
    <td id="desc">
    <i class="fa fa-text" aria-hidden="true" title="Description"></i>
    <em class="mdocs-black">Test</em>
    </td>
    
    Thread Starter Ivaseg

    (@ivaseg)

    Cache cleared, other plugins deactivated.
    1. Issue with tag P still exist.
    2. Issue with useless tags still exist, you just add class mdocs-black to tag em, but if we have blank description, output html must be similar to:
    <td id="desc">&nbsp;</td>
    This is not hard to do, you just need to check value and output two different html code (one for filled description and one for blank description).

    Plugin Author bhaldie

    (@bhaldie)

    Thanks for the tip……

    Thread Starter Ivaseg

    (@ivaseg)

    https://i.imgur.com/KCzPXRy.gifv look for P tag issue.

    Plugin Author bhaldie

    (@bhaldie)

    yes I see it, I’ll put it on my todo list.

    Thread Starter Ivaseg

    (@ivaseg)

    If you can’t control this tag P after updating, so you can try to add this tag P with first file upload, so after user will try to update file, may be this additional P will not added.

    Another thing with this issue is come if you will try to validate output html code and u will got an error:

    Element p not allowed as child of element em in this context.

    Thread Starter Ivaseg

    (@ivaseg)

    By the way, why you output icon for field description?
    <i class="" aria-hidden="true" title="Description"></i>
    I can’t see this icon but it take place (blank gap on top). So, to remove this gap users need to do this with CSS and this is bad idea. I think, you don’t need to output this tag I if icon not showing to users then there will not be gap. If you need, I can record screen again to show this problem.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Description field small bug’ is closed to new replies.