DIV TAG duplication to description area error in keywords functionality for user

  • john
    john
    Newbie 16 points
    January 30, 2020 at 12:11 pm

    Each time a user saves their listing, a div tag is being created and added wrong to the description area. This is not happening when admin edits listings from back end.

    If you the user has keywords in use, the div will also add the keyword text below the user description as text. This is happening on a clean install without anything but PP required plugins. Can someone test their site to check if they have this issue. Much appreciated.
    This is happening on Directory theme V9
    I have a ticket in with PP (BSZ-482-59221) and will let you know if a fix is possible.
    Thanks John

    Attachments:
    You must be logged in to view attached files.
  • john
    john
    Newbie 16 points
    January 30, 2020 at 2:34 pm

    I have tried using the Elementor template for listings and that does not stop the error either. Have added a new image on this reply to show where the tags text is wrongly showing in description area.

    Attachments:
    You must be logged in to view attached files.
  • JamesD
    JamesD
    Super Guru 1,721 points
    January 30, 2020 at 8:19 pm

    Hello John,

    Make a backup copy first then open file /DT9/framework/new_class/ppt_9_ajax.php.
    Look around lines 1209-1210 for…

    			// SAVE POST TAGS
    			if(isset($data['form']['post_tags'])){

    And replace with…

    			// SAVE POST TAGS
    			if(isset($data['form']['post_tags']) && !empty($data['form']['post_tags'])){
  • john
    john
    Newbie 1 points
    January 31, 2020 at 10:00 am

    Hi James, Thank you for the code but unfortunately it didn’t stop the duplication into the description field by the keywords.
    I can’t understand why Mark or the team have not worked on my ticket as it’s been a while. So frustrating as it makes me look bad in front of clients.

    I would be very interested to see any V9 live sites as I myself am struggling.
    I have a V8 that finally ended up working nicely but dread the day the php upgrades eventually break it.

    I have seen you help a lot of people over the years, hope you get rewarded for it?
    All the best John

  • john
    john
    Newbie 16 points
    February 1, 2020 at 1:20 pm

    I have a little more information on the Keywords div tags and keywords that are showing in the listing description area… The problem is only created when a subscriber edits their listing from their edit listing area.

    You cannot recreate this issue if you are logged in as a admin.

    However this is a problem for all of us as it will bloat the amount of space used on your site…every time a user saves their listing a little more will be added.

  • john
    john
    Newbie 16 points
    February 1, 2020 at 1:31 pm

    See how the keywords is saving into the text area of the description field…… I have pasted what is showing below… you can see where I saved 3 times and it keeps adding the keywords words!

    Description

    This is a listing created by the end user. This is a listing created by the end user. This is a listing created by the end user. This is a listing created by the end user. SEE HERE
    Keyword1 Keyword2 Keyword3 Keyword4
    NOW I WILL SAVE AGAIN FROM USER END
    Keyword1 Keyword2 Keyword3 Keyword4
    AGAIN I WILL SAVE IT FROM USER ACCOUNT END
    Keyword1 Keyword2 Keyword3 Keyword4

    Amenities

  • john
    john
    Newbie 16 points
    February 1, 2020 at 1:32 pm

    Just to point out this is on a clean install of Directory Theme V9 newest version.

  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    February 1, 2020 at 1:39 pm

    Thanks – ill look into this and add a fix for the next update.

  • john
    john
    Newbie 16 points
    February 1, 2020 at 1:45 pm

    Thanks Mark, Alex had a look but wasn’t logged in as a subscriber, so didn’t see the issue. Thanks for helping… glad you were online today. Cheers John

  • JamesD
    JamesD
    Super Guru 1,721 points
    February 2, 2020 at 7:52 am

    Hey John,
    It looks like that portion of // SAVE POST TAGS code is the cause.

    In the meantime you can try this…
    Either remove this portion:

    			// ADD TAGS TO CONTENT FOR BETTER SEARCHING
    			// SAVE POST TAGS
    			if(isset($data['form']['post_tags'])){
    
    				$CONTENT .= "<div style='display:none'>".str_replace(","," ",strip_tags($data['form']['post_tags']))."</div>";
    			}

    Or replace it with this to comment it out (keep it from running):

    /** // Cause of post tag double div
    			// ADD TAGS TO CONTENT FOR BETTER SEARCHING
    			// SAVE POST TAGS
    			if(isset($data['form']['post_tags'])){
    			    
    			    $CONTENT .= "<div style='display:none'>".str_replace(","," ",strip_tags($data['form']['post_tags']))."</div>";
    			}
    */
  • Mark Fail
    Mark Fail
    Super Guru 13,013 points
    February 3, 2020 at 12:34 pm

    The fix is in the update ill be adding this weekend.

Viewing 11 posts - 1 through 11 (of 11 total)

New Business Themes for WordPress 2020

Start your new website today!

View Business Themes