WordPress.org

Ready to get started?Download WordPress

Forums

Bootstrap Ultimate
bug corection bootstrap ultimate theme (6 posts)

4 stars
  1. franz65
    Member
    Posted 4 months ago #

    I have found 2 bugs the first one makes all the posts in carousel selected when loading home page. There is simply the word "active" in the wrong place in /inc/modules/carousel.php
    this is the corrected code

    <div class="carousel slide" id="myCarousel">
      <!-- Indicators -->
      <ol class="carousel-indicators">
            <li class="active" data-slide-to="0" data-target="#myCarousel"></li>
        <?php $cnt=1;
            while($cnt < $postcnt) {
              echo '<li data-slide-to="'.$cnt.'" data-target="#myCarousel" class=""></li>';
              $cnt++;
              }
            ?>
      </ol>

    The second one affects categories selection in higlights, carousel, featurettes etc. when I have categories that are not sequentially numbered from 1 to n, for example if I delete a category then add other categories.
    In inc/eo/admin-functions.php the wrong function array_merge is used to merge two arrays. This function renumbers all the numeric keys.
    The correct function to use is simply + to add two arrays

    Corrected code:
    inc/eo/admin-functions.php

    function eo_get_q_cats() {
            $category_ids = get_all_category_ids();
            $cat_arr = array();
            foreach($category_ids as $cat_id) {
              $cat_name = get_cat_name($cat_id);
              //  echo $cat_id . ': ' . $cat_name;
            $cat_arr[$cat_id] = $cat_name;
            }
            ksort($cat_arr);
            $st_cat_arr = array(0 => "ALL");
            //      $fin_cat_arr = array_merge($st_cat_arr,$cat_arr);
            $fin_cat_arr = $st_cat_arr+$cat_arr;
            return $fin_cat_arr;
    }
  2. eminozlem
    Member
    Theme Author

    Posted 4 months ago #

    Thank you for suggestions, I'll look into those, never had or been reported such issues. But even if these do exist, all in all, I don't think they are are big enough to knock of one-star (: I'd be glad if you'd take a look at the rating guides, and change your vote accordingly

  3. franz65
    Member
    Posted 4 months ago #

    Hallo,
    I installed wordpress automatically in Bluehost and then I installed the theme without changing anything, so I think the bug is present in the default version of the theme.
    I looked for answer to the problem I had and I found nothing, I know that this sounds strange, but I went mad to try to understand why highlights and featurettes etc worked well with some catagories and didn't work with some others.

    I paste you the source code of the control panel page, the option selector for highlights, first with the original code then with my code:

    <option value="0">ALL</option>
    <option value="1">Uncategorized</option>
    <option selected='selected' value="2">storie</option>
    <option value="3">narrazioni</option><
    option value="4">narrazioni speculative</option>
    <option value="5">poesie</option>
    <option value="6">Sonny O.</option>
    <option value="7">M. E. Stetson</option>
    <option value="8">Valavan</option>
    <option value="9">Raven</option>
    <option value="10">Holmes</option>
    <option value="11">disegni</option>
    <option value="12">vuota</option>
    <option value="13">testi e note</option>
    <option value="0">ALL</option>
    <option value="1">Uncategorized</option
    ><option selected='selected' value="2">storie</option>
    <option value="3">narrazioni</option>
    <option value="4">narrazioni speculative</option
    ><option value="5">poesie</option>
    <option value="6">Sonny O.</option>
    <option value="7">M. E. Stetson</option>
    <option value="8">Valavan</option>
    <option value="10">Raven</option>
    <option value="11">Holmes</option>
    <option value="12">disegni</option>
    <option value="30">vuota</option>
    <option value="31">testi e note</option>

    everything worked fine if I selected categories from 0 to 8, but of course everything went wrong with the others. In wordpress the categories are not numbered in a sequential way.

    I am not a php programmer, so even when I understood which part of the code was the one provoking the bug I needed a lot of time to imagine that array_merge doesn't simply merges two array but: "Don't forget that numeric keys will be renumbered!" (from php documentation).

    About the starts, I admit that I didn't read the rating guides, the theme is really good, but I really wasted a lot of time to obtain the result I wanted and I was tempted to leave it before founding the way to correct the bug. So I think that 4 stars are not a bad vote. :)

  4. ravimallya
    Member
    Posted 4 months ago #

    I tried franz65's solution to fix the active class issue for carousel indicator but not seems get it fixed.

    Also, I found another bug. I'm using child theme and I included /inc folder in child theme to get some of the errors fixed. The bug is the images in carousel are duplicated. Here is the HTML output:

    <div class="carousel-inner">
                    <div class="item active">
                            <img src="http://192.168.1.120:81/blog/wp-content/uploads/2014/02/Lighthouse-970x360.jpg" class="attachment-eo-carousel wp-post-image" alt="Lighthouse">            <img src="http://192.168.1.120:81/blog/wp-content/uploads/2014/02/Lighthouse-970x360.jpg" class="attachment-eo-carousel wp-post-image" alt="Lighthouse">            <div class="container">
                    <div class="carousel-caption">
                        <h1>Demo post13</h1>
                        Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis ...<a href="http://192.168.1.120:81/blog/deep-blue/demo-post13" class="btn btn-large btn-primary">Details <span class="glyphicon glyphicon-chevron-right"></span></a>
                    </div>
                </div>
            </div>
                    <div class="item ">
                            <img src="http://192.168.1.120:81/blog/wp-content/uploads/2014/02/Desert-970x360.jpg" class="attachment-eo-carousel wp-post-image" alt="Desert">            <img src="http://192.168.1.120:81/blog/wp-content/uploads/2014/02/Desert-970x360.jpg" class="attachment-eo-carousel wp-post-image" alt="Desert">            <div class="container">
                    <div class="carousel-caption">
                        <h1>Demo post14</h1>
                        Header Level 3 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam tincidunt ...<a href="http://192.168.1.120:81/blog/cutting-short-sticks/demo-post14" class="btn btn-large btn-primary">Details <span class="glyphicon glyphicon-chevron-right"></span></a>
                    </div>
                </div>
            </div>
                    <div class="item ">
                            <img src="http://192.168.1.120:81/blog/wp-content/uploads/2014/02/Tulips-970x360.jpg" class="attachment-eo-carousel wp-post-image" alt="Tulips">            <img src="http://192.168.1.120:81/blog/wp-content/uploads/2014/02/Tulips-970x360.jpg" class="attachment-eo-carousel wp-post-image" alt="Tulips">            <div class="container">
                    <div class="carousel-caption">
                        <h1>Demo post3</h1>
                        Header Level 3 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam tincidunt ...<a href="http://192.168.1.120:81/blog/deep-blue/demo-post3" class="btn btn-large btn-primary">Details <span class="glyphicon glyphicon-chevron-right"></span></a>
                    </div>
                </div>
            </div>
                </div>

    I used 'Featured Image' but not custom Image. I didn't change anything in carousel.php file. not sure what's going on.

  5. ravimallya
    Member
    Posted 4 months ago #

    I was able to fix active class issue.

    Just removed class from li in the carousel.php from following condition

    while($cnt < $postcnt) {
    	  echo '<li data-slide-to="'.$cnt.'" data-target="#myCarousel" ></li>';
    	  $cnt++;
    	  }
    	?>

    and added class="active" to the li at

    <!-- Indicators -->
      <ol class="carousel-indicators">
    	<li class="active" data-slide-to="0" data-target="#myCarousel"></li>

    But still I can't figure out the duplicate image issue.

  6. eminozlem
    Member
    Theme Author

    Posted 3 months ago #

    All of these issues with the carousel has been fixed. Also the carousel now has a much more sensible layout. Please download the latest version from SVN: http://wordpress.org/themes/download/bootstrap-ultimate.1.4.9.zip
    Or play with the demo here: http://eodepo.com/wp/demo/bootstrap-ul/

    And finally please change your vote to 5* accordingly (: Let me know if you have any problems, cheers.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.