Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • activha Friend
    #1067103

    Hello

    After upgrade to joomla 2.8.1 and K2 2.8.0, JA Wall loads pages without stopping for the k2 user. It seems that the pagination always loads the same page again and again

    The code used is

        <!-- Pagination -->
        <?php
                // Build the additional URL parameters string.
                $urlparams = '';
                if (!empty($this->pagination->_additionalUrlParams))
                {
                    foreach ($this->pagination->_additionalUrlParams as $key => $value)
                    {
                        $urlparams .= '&' . $key . '=' . $value;
                    }
                }
                $next = $this->pagination->get('pages.current') * $this->pagination->limit;
                $nextlink = JRoute::_($urlparams . '&' . $this->pagination->prefix . 'limitstart=' . $next);
        ?>
        <div id="page-nav">
            <a id="page-next-link" href="<?php echo $nextlink ?>"></a>
        </div>

    Seems like the problem comes from wall.js and

    /* infinitive scroll for main masonry only */
            if ($container.length && $('#page-nav').length && $('#page-next-link').length) {
                var pathObject = {
                    init: function(){
                        this.path = ($('#page-next-link').attr('href') || '');
                        var match = this.path.match(/((page|start)[=-])(\d*)(&*)/i);
                        if(match){
                            this.type = match[2].toLowerCase();
                            this.number = match[3];
                            this.limit = this.type == 'page' ? 1 : this.number;
                            this.number = this.type == 'page' ? this.number : 1;
                        } else {
                            this.type = 'unk';
                            this.number = 2;
                            this.path = this.path + (this.path.indexOf('?') == -1 ? '?' : '') + 'page=';
                        }
                    },
    
                    join: function(page){
                        if(this.type == 'unk'){
                            return this.path + this.number++;
                        } else{
                            return this.path.replace(/((page|start)[=-])(\d*)(&*)/i, '$1' + (this.limit * this.number++) + '$4');
                        }
                    }
                };

    The joomla pagination object is now :

    Joomla\CMS\Pagination\Pagination Object
    (
        [limitstart] => 0
        [limit] => 15
        [total] => 16
        [prefix] => 
        [pagesStart] => 1
        [pagesStop] => 2
        [pagesCurrent] => 1
        [pagesTotal] => 2
        [viewall:protected] => 
        [additionalUrlParams:protected] => Array
            (

    So could you have an urgent look and tell me what to change to find the correct behavior back ?

    That’s pretty urgent all our users are impacted

    Regards Jean

    • This topic was modified 2 years, 3 months ago by  activha.
    • This topic was modified 2 years, 3 months ago by  activha.
    • This topic was modified 2 years, 3 months ago by  activha.
    Saguaros Moderator
    #1067235

    Hi Jean,

    JA Wall is not ready for J 3.8.1 yet, pls wait for the new release of template before updating Joomla.

    Regards

    activha Friend
    #1067236

    Well that’s too late as we use two different templates on our website and we need also to be secure with 3.8.1

    This is the only thing that needs to be solved from our end but I don’t know how to cope with this one.

    Can you help me only with this pagination problem and I’ll be glad to wait for the next release of JA Wall for other small corrections ?

    That ‘s really important
    Thanks
    Regards
    Jean

    Saguaros Moderator
    #1067414

    Hi Jean,

    I can’t replicate issue at my end, you can share the admin + FTP account of your site so I will take a look.

    activha Friend
    #1067824

    Found the problem, k2 introduced a way to redirect user to home page when there is no items for this user.

    As we use pagination on our pages with a virtual domain plugin where the user’s k2 page becomes its own home page, ja wall pagination with this new k2 feature does not work

    I had to comment line 410 redirect(JUri::root() in the view.html.php of k2 views/.itemlist/tmpl to solve temporarily the problem

    Do you think that you can change ja wall pagination behavior on wall.js to avoid this problem ?

    Saguaros Moderator
    #1068040

    Could you use that solution at this moment? as I tried to replicate issue but my side but without success: J3.8.1, K2 2.8.0, different pages… but the pagination still work fine.

    activha Friend
    #1068088

    Yes w will use that solution for now
    🙂

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

This topic contains 6 replies, has 2 voices, and was last updated by  activha 2 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum