• There are SOOOOOOOO many validation errors.. will post more solutions as I find them..

    In the meantime, this error “Element link is missing required attribute property

    The RIGHT fix would be for the authors to properly enqueue the stylesheets and javascripts this plugin needs so they are inside the head tag..

    In the meantime the bandaid (not as good) fix is to make the following changes..

    In the file: wp-content/plugins/gallery-images/Front_end/gallery_front_end_view.php

    Find this block of code:

    <!--Huge IT gallery START-->
    	<!-- GALLERY CONTENT POPUP -->
    	<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    		if ( !(is_plugin_active( 'lightbox/lightbox.php' ) )) {
    		?>
    	<link href="<?php echo plugins_url('../style/colorbox-'.$paramssld['light_box_style'].'.css', __FILE__);?>" rel="stylesheet" type="text/css" />
    	<?php } ?>
    	<link href="<?php echo plugins_url('../style/gallery-all.css', __FILE__);?>" rel="stylesheet" type="text/css" />
    	<script src="<?php echo plugins_url('../js/jquery.colorbox.js', __FILE__);?>"></script>
    	<script src="<?php echo plugins_url('../js/gallery-all.js', __FILE__);?>"></script>
    	<link rel="stylesheet" href="<?php echo plugins_url('../style/style2-os.css', __FILE__);?>" />
    	<script src="<?php echo plugins_url('../js/jquery.hugeitmicro.min.js', __FILE__);?>"></script>
    	<link href="<?php echo plugins_url('../style/lightbox.css', __FILE__);?>" rel="stylesheet" type="text/css" />

    Replace it with this:

    <!--Huge IT gallery START-->
    	<!-- GALLERY CONTENT POPUP -->
    	<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    		if ( !(is_plugin_active( 'lightbox/lightbox.php' ) )) {
    		?>
    	<link href="<?php echo plugins_url('../style/colorbox-'.$paramssld['light_box_style'].'.css', __FILE__);?>" rel="stylesheet" property="stylesheet" type="text/css" />
    	<?php } ?>
    	<link href="<?php echo plugins_url('../style/gallery-all.css', __FILE__);?>" rel="stylesheet" property="stylesheet" type="text/css" />
    	<script src="<?php echo plugins_url('../js/jquery.colorbox.js', __FILE__);?>"></script>
    	<script src="<?php echo plugins_url('../js/gallery-all.js', __FILE__);?>"></script>
    	<link href="<?php echo plugins_url('../style/style2-os.css', __FILE__);?>" rel="stylesheet" property="stylesheet" type="text/css" />
    	<script src="<?php echo plugins_url('../js/jquery.hugeitmicro.min.js', __FILE__);?>"></script>
    	<link href="<?php echo plugins_url('../style/lightbox.css', __FILE__);?>" rel="stylesheet" property="stylesheet" type="text/css" />

    https://www.ads-software.com/plugins/slider-image/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter DivaVocals

    (@divavocals)

    So I managed to get three of the spreadsheet properly enqueued.. So now here’s all the changes I made.. Keep in mind this is a PARTIAL fix.. Truthfully the authors need to fix this plugin to properly encode the stylesheets and javascript versus HARDCODING them into the plugin as they are now..

    in this file: wp-content/plugins/gallery-images/gallery-images.php

    Find this (top of the file):

    Plugin URI: https://huge-it.com/wordpress-gallery/
    Description: Huge-IT Gallery images is perfect for using for creating various portfolios within various views.
    Version: 10.0
    Author: https://huge-it.com/
    License: GNU/GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
    */

    and just below it put this:

    // Register hugeit_galleryall stylesheet on initialization
    add_action('init', 'hugeit_galleryall_new_register_script');
    function hugeit_galleryall_new_register_script(){
      wp_register_style( 'hugeit_galleryall', plugins_url('/style/gallery-all.css', __FILE__), false, '1.0', 'all');
    }
    // use the registered hugeit_galleryall stylesheet above
    add_action('wp_enqueue_scripts', 'hugeit_galleryall_new_enqueue_style');
    function hugeit_galleryall_new_enqueue_style(){
      wp_enqueue_style( 'hugeit_galleryall' );
    }
    
    // Register hugeit_style2os stylesheet on initialization
    add_action('init', 'hugeit_style2os_new_register_script');
    function hugeit_style2os_new_register_script(){
      wp_register_style( 'hugeit_style2os', plugins_url('/style/style2-os.css', __FILE__), false, '1.0', 'all');
    }
    // use the registered hugeit_style2os stylesheet above
    add_action('wp_enqueue_scripts', 'hugeit_style2os_new_enqueue_style');
    function hugeit_style2os_new_enqueue_style(){
      wp_enqueue_style( 'hugeit_style2os' );
    }
    
    // Register hugeit_lightbox stylesheet on initialization
    add_action('init', 'hugeit_lightbox_new_register_script');
    function hugeit_lightbox_new_register_script(){
      wp_register_style( 'hugeit_lightbox', plugins_url('/style/lightbox.css', __FILE__), false, '1.0', 'all');
    }
    // use the registered hugeit_lightbox stylesheet above
    add_action('wp_enqueue_scripts', 'hugeit_lightbox_new_enqueue_style');
    function hugeit_lightbox_new_enqueue_style(){
      wp_enqueue_style( 'hugeit_lightbox' );
    }

    The in this file: wp-content/plugins/gallery-images/Front_end/gallery_front_end_view.php

    Find this:

    <!--Huge IT gallery START-->
    	<!-- GALLERY CONTENT POPUP -->
    	<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    		if ( !(is_plugin_active( 'lightbox/lightbox.php' ) )) {
    		?>
    	<link href="<?php echo plugins_url('../style/colorbox-'.$paramssld['light_box_style'].'.css', __FILE__);?>" rel="stylesheet" type="text/css" />
    	<?php } ?>
    	<link href="<?php echo plugins_url('../style/gallery-all.css', __FILE__);?>" rel="stylesheet" type="text/css" />
    	<script src="<?php echo plugins_url('../js/jquery.colorbox.js', __FILE__);?>"></script>
    	<script src="<?php echo plugins_url('../js/gallery-all.js', __FILE__);?>"></script>
    	<link rel="stylesheet" href="<?php echo plugins_url('../style/style2-os.css', __FILE__);?>" />
    	<script src="<?php echo plugins_url('../js/jquery.hugeitmicro.min.js', __FILE__);?>"></script>
    	<link href="<?php echo plugins_url('../style/lightbox.css', __FILE__);?>" rel="stylesheet" type="text/css" />

    Replace with this:

    <!--Huge IT gallery START-->
    	<!-- GALLERY CONTENT POPUP -->
    	<?php include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    		if ( !(is_plugin_active( 'lightbox/lightbox.php' ) )) {
    		?>
    	<link href="<?php echo plugins_url('../style/colorbox-'.$paramssld['light_box_style'].'.css', __FILE__);?>" rel="stylesheet" property="stylesheet" type="text/css" />
    	<?php } ?>
    	<script src="<?php echo plugins_url('../js/jquery.colorbox.js', __FILE__);?>"></script>
    	<script src="<?php echo plugins_url('../js/gallery-all.js', __FILE__);?>"></script>
    	<script src="<?php echo plugins_url('../js/jquery.hugeitmicro.min.js', __FILE__);?>"></script>

    I added the missing attibute “property” to thr “light_box_style” because I can’t quite figure out how to enqueue that one since it’s wrapped inside that conditional.. Now the validator won’t stumble over the stylesheets in this plugin..

    Thread Starter DivaVocals

    (@divavocals)

    Other validation errors:

    An img element must have an alt attribute – This is an accessibility issue, and SHOULD be fixed.. Author just needs to add a field to enter an image alt and title attribute when creating a gallery or slideshow..

    Attribute image_id not allowed on element img at this point – This is an invalid image attribute.. period.. Gonna see if I can figure out how/where this is being introduced and modify the plugin.

    <img id="<strong>huge_it_slideshow_image_gallery_2</strong>" class="huge_it_slideshow_image_gallery_2" src="https://tablelegworld.com/tablelegblog/wp-content/uploads/2014/11/slide10.jpg" <strong>image_id="13"</strong> />

    Duplicate ID huge_it_slideshow_image_gallery_2 – This is a BIG non no.. IDs are supposed to be UNIQUE and to be used ONLY ONCE. Instead this plugin spits out code that looks like this which will FAIL validation:

    <li class="huge_it_slideshow_image_second_item_gallery_2" id="image_id_gallery_2_12">
    <a href="/Table-Height-Legs/Spiral-Cone-Leg">
    <img id="<strong>huge_it_slideshow_image_gallery_2</strong>" class="huge_it_slideshow_image_gallery_2" src="https://tablelegworld.com/tablelegblog/wp-content/uploads/2014/11/slide10.jpg" <strong>image_id="13"</strong> />

    Bad value huge_it_slideshow_right-ico_2 , data_2 for attribute id on element div: An ID must not contain whitespace – Again this is just invalid code and doesn’t belong in the plugin:

    <div id="huge_it_slideshow_right-ico_2 , data_2">

    Can’t tag a block with more than one ID. You can apply more than one class, but each class should be separated with a SPACE not a comma.

    Hopefully the authors will fix all of this, but in the meantime I will post solutions as I find them.

    Hello
    Dear user, first of all this forum is for Slider, and you wrote about Image Gallery.
    Please contact our developers by [email protected], they will try to fix your issues

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does NOT validate!!!’ is closed to new replies.