I remove

tag from file ddblock-cycle-block-content-gradient-blue30p.tpl.php
line 72

<p><?php print $slider_item['slide_text'] ?></p>

line 76

<p><?php print $slider_item['slide_read_more'] ?></p>

This give me error on w3c markup validation (I have block on front page).

Comments

tracerul’s picture

oups, i talk about p tag

<p>
ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)

If you use a WYSIWYG editor which adds a <p> tag to these field you can delete them in the template file.

Hope this helps you further, please let me know.

tracerul’s picture

I don't have WYSIWYG editor, <p> tag is there in source code which download it form here http://ddblock.myalbums.biz/download , file gradient-blue30p.zip.

ppblaauw’s picture

What validation error do you get?
Do you have a link to your Internet site?

tracerul’s picture

I use this link to validate my site http://validator.w3.org/ ,but now there is no problem because I remove this tags.Link to my site is in profile.Error it's like this : document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag and explication : One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

bstrange’s picture

Status: Postponed (maintainer needs more info) » Active

I am getting the same validation error using Upright20 and version 6.x-1.0-rc6 on the following page http://www.sanduskyspotlight.com/business-search . The error is reported from the same link posted by tracerul http://validator.w3.org/ and is as follows:

Line 284, Column 20: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag 
               <p><p>Proudly providing Sandusky and North East Ohio with quality…✉  
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. 

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). 

and is in reference to the following HTML output at line 284 (also 262, 285, 307 coresponding to the 3 DDBlock News Items):

<p><p>Proudly providing Sandusky and North East Ohio with quality, in-home, computer repair, service, training, webpage design services and maintenance plans.</p>

It seems that it doubles the initial <p>. It should be noted that Upright20 is being used out of the box (as best I can remember) with little or no modification to ddblock-cycle-block-content-upright20.tpl.php (the file that I believe is causing these errors).

My question is, can I simply delete the <p> tags from ddblock-cycle-block-content-upright20.tpl.php as tracerul indicated they did?

I would assume if that is the solution, then the current ddblock-cycle-block-content-upright20.tpl.php (33-81)

drupal_add_css($directory .'/custom/modules/ddblock/'.$template. '/ddblock-cycle-'.$template. '.css', 'template', 'all', FALSE);
?>
<!-- dynamic display block slideshow -->
<div id="ddblock-<?php print $delta ?>" class="ddblock-cycle-<?php print $template ?> clear-block">
 <div class="container clear-block border">
  <div class="container-inner clear-block border">
   <?php if ($pager_position == "top") : ?>
    <!-- prev/next pager --> 
    <?php print $pager_content ?>
   <?php endif; ?>
  <!-- slider content -->
   <div class="slider clear-block border">
    <div class="slider-inner clear-block border">
     <?php if ($output_type == 'view_fields') : ?>
      <?php foreach ($slider_items as $slider_item): ?>
       <div class="slide clear-block border">
        <div class="slide-inner clear-block border">
         <?php print $slider_item['slide_image']; ?>
         <div class="slide-text slide-text-<?php print $slide_direction ?> slide-text-<?php print $slide_text_position ?> clear-block border">
          <div class="slide-text-inner clear-block border">
           <div class="slide-title slide-title-<?php print $slide_direction ?> clear-block border">
            <div class="slide-title-inner clear-block border">
             <h2><?php print $slider_item['slide_title'] ?></h2>
            </div> <!-- slide-title-inner-->
           </div>  <!-- slide-title-->
            <div class="slide-body-<?php print $slide_direction ?> clear-block border">
             <div class="slide-body-inner clear-block border">
              <p><?php print $slider_item['slide_text'] ?></p>
             </div> <!-- slide-body-inner-->
            </div>  <!-- slide-body-->
            <div class="slide-read-more slide-read-more-<?php print $slide_direction ?> clear-block border">
				     <p><?php print $slider_item['slide_read_more'] ?></p>
				    </div><!-- slide-read-more-->
           </div> <!-- slide-text-inner-->
          </div>  <!-- slide-text-->
         </div> <!-- slide-inner-->
        </div>  <!-- slide-->
       <?php endforeach; ?>
      <?php endif; ?>
     </div> <!-- slider-inner-->
    </div>  <!-- slider-->
   <?php if ($pager_position == "bottom") : ?>
    <!-- prev/next pager --> 
    <?php print $pager_content ?>
   <?php endif; ?>
  </div> <!-- container-inner-->
 </div> <!--container-->
</div> <!--  template -->

the following sections should be changed to:

(59-61)

<div class="slide-body-inner clear-block border">
              <p><?php print $slider_item['slide_text'] ?></p>
             </div> <!-- slide-body-inner-->

to

<div class="slide-body-inner clear-block border">
              <?php print $slider_item['slide_text'] ?>
             </div> <!-- slide-body-inner-->

and (63-65)

<div class="slide-read-more slide-read-more-<?php print $slide_direction ?> clear-block border">
				     <p><?php print $slider_item['slide_read_more'] ?></p>
				    </div><!-- slide-read-more-->

to

<div class="slide-read-more slide-read-more-<?php print $slide_direction ?> clear-block border">
				     <?php print $slider_item['slide_read_more'] ?>
				    </div><!-- slide-read-more-->

So, do you think it's OK if I just make the changes listed above to resolve the validation errors? Or are there other adjustments I can make to fix the errors beyond simply deleting the <p> tags?

Let me know what you think or if you need any more information.

Thanks! :)

Edit to Add: I have no WYSIWYG editors installed that would have added their own <p> tags? Is it possible another module is adding the double 'p'?

Also, I have another validation error (warning) related to DDBlock:

Line 325, Column 25: character "<" is the first character of a delimiter but occurred as data 
 <a id="prev2" href="#"><< Prev</a>✉ 
This message may appear in several cases: 

•You tried to include the "<" character in your page: you should escape it as "&lt;"
•You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
•Another possibility is that you forgot to close quotes in a previous tag.

and it references the following section of HTML output (323-327):

<!-- prev next pager. -->
<div id="ddblock-prev-next-pager-2" class="prev-next-pager ddblock-pager clear-block">
<a id="prev2" href="#"><< Prev</a>
<a id="count2"></a>
<a id="next2" href="#">Next >></a>

I wasn't sure if I should start a seperate issue for lookup purposes or leave it here with the other validation errors...

ppblaauw’s picture

Status: Active » Postponed (maintainer needs more info)
The <p> tags can be deleted from the upright template like you suggest.
"<< prev" can be changed by "&lt;&lt; prev"
bstrange’s picture

Thanks! That worked finally :)

ppblaauw’s picture

Looks like the ddblock-cycle-pager-content-upright20.tpl.php and ddblock-cycle-block-content-upright20.tpl.php from above are not used.

Do you maybe have another copy of these slideshow template files in your drupal installation.

Maybe you could change something obvious to find out if the template files are used.
Also with the theme developer module you could find out which tpl.php files are used.

bstrange’s picture

Wow, you are always on here! Your reply is correct, there were copies of those files in both the sites/all/mytheme/custom folder as well as sites/all/mytheme/custom/modules/ddblock, aparently, I replaced the wrong one. Once I replaced it, it validated correctly.

Sorry I edited and changed my previous post, I didn't think it held anything that would help users with similar issues in the future and figured I'd save you the extra early morning reading. (I can revert it to what I originally posted if you would like)

Thanks again, and once again I am amazed with how dilligent you are with your issue queue :)

bogorman’s picture

Don't know whether I should have opened a new thread as I am using ddblock 7x-1.0
When I use www.validator.w3.org I get the error:

No p element in scope but a p end tag seen

<div class="slide-body-inner clearfix">
<p><p>Reasons for Believing Pamphlets Series</p>
</p>
</div> <!-- slide-body-inner-->

am using ddblock-cycle-upright10p.css. I do use creditor to edit the body content but this seems to be an error around the title field - sorry, I am not an expert!

Would value your advice. The (test) site is:

bogorman’s picture

Sorry, typo in my last post. The editor is CKEditor.

bogorman’s picture

Have noticed that the extra tags are in fact around the content in the Pager Item Text field, not the Title field.