Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#241 2023-02-12 08:33:30

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: etc_pagination: paginate everything

I finally got the paginating of article_custom running thanks to etc_pagination. But I am getting an error although everything seems to work fine. If I set textpattern into LIVE modus the error is of course hidden. But I still would like to get rid of it.

Warning: Undefined array key 1 while parsing form Keine on page ...

I am using Textpattern 4.8.8 and plugin version 0.4.7b

Offline

#242 2023-02-12 21:12:42

etc
Developer
Registered: 2010-11-11
Posts: 5,090
Website GitHub

Re: etc_pagination: paginate everything

Sorry, no clue, we need the whole debug message and context to help.

Offline

#243 2023-02-13 21:23:08

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: etc_pagination: paginate everything

No I am sorry. Somehow I was hoping that my provided info was enough.
So the whole debug message is:

Tag error: <txp:etc_pagination range="2" prev="" next="" class="pagination" wraptag="ul" break="li" /> ->  Warning: Undefined array key 1 while parsing form Keine on page video

As I said the pagination seems to work fine.
For context I do not see anything special. That´s why I asumed that it might be because I am using a beta version (if that is what the b stands for)

I have the articles on that page in a

<txp:article limit="2"> ... </txp:article>

(for testing purpose just 2)

and outside of it I have the pagination like that:

<txp:etc_pagination range="2" prev="" next="" class="pagination" wraptag="ul" break="li" />

Offline

#244 2023-02-14 20:54:52

etc
Developer
Registered: 2010-11-11
Posts: 5,090
Website GitHub

Re: etc_pagination: paginate everything

Well, that’s an old one. Please download v0.4.8, but I suspect you should be able to replace it with core tags in txp 4.8.8.

Offline

#245 2023-02-14 21:14:03

demoncleaner
Plugin Author
From: Germany
Registered: 2008-06-29
Posts: 220
Website

Re: etc_pagination: paginate everything

Works like a charm. Thank you so much etc.
Indeed I was looking to handle it with core tags and stumbled over this https://docs.textpattern.com/tags/pages

But could not get it working for article_custom so I went back to etc_pagination.

Offline

#246 2023-02-15 21:34:50

etc
Developer
Registered: 2010-11-11
Posts: 5,090
Website GitHub

Re: etc_pagination: paginate everything

demoncleaner wrote #334647:

But could not get it working for article_custom so I went back to etc_pagination.

FWIW, <txp:article_custom /> accepts pageby attribute that sets the pagination data.

Offline

#247 2024-05-18 20:41:39

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 278

Re: etc_pagination: paginate everything

I used etc_pagination for all my pages, it works fine but just the following error appears when I upload to my live server for search article:
Tag error: <txp:etc_pagination range="20" prev="Prev" next="Next" wraptag="ul" break="li" /> -> Warning: Undefined array key 1 while parsing form None on page urdu
But, when I use my localhost, that error does not appear.

Offline

#248 2024-05-19 14:21:35

etc
Developer
Registered: 2010-11-11
Posts: 5,090
Website GitHub

Re: etc_pagination: paginate everything

Please post the full debug output (functions, line number), the plugin and php versions.

Does this help, by any chance?

Offline

#249 2024-06-15 20:33:40

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 72

Re: etc_pagination: paginate everything

I’ve txp 4.8.8 ; etc_pagination 0.4.8 ; etc_query 1.5.8
When I use etc_pagination to my category it works fine with this kind of URL website.com/category/news/?pg=2
but with this kind of URL not working website.com/?s=english&c=news&pg=2
If I disable the etc_query, it will works fine but I need that for my website menu management ;-)

Here is the error:

 
Fatal error: Uncaught Error: Unsupported operand types in /home/aua/public_html/textpattern/plugins/etc_query/etc_query.php:589 Stack trace: #0 /home/aua/public_html/textpattern/plugins/etc_query/etc_query.php(173): etc_parse_xpath('//a[@href="http...', false) #1 [internal function]: etc_query(Array, NULL) #2 /home/aua/public_html/textpattern/vendors/Textpattern/Tag/Registry.php(140): call_user_func('etc_query', Array, NULL) #3 /home/aua/public_html/textpattern/lib/txplib_publish.php(559): Textpattern\Tag\Registry->process('etc_query', Array, NULL) #4 /home/aua/public_html/textpattern/lib/txplib_publish.php(409): processTags('etc_query', 'data='<txp:etc_...', NULL, false) #5 /home/aua/public_html/textpattern/lib/txplib_misc.php(3626): parse('<!doctype html>...') #6 /home/aua/public_html/textpattern/publish.php(740): parse_page('English', 'four-point-eigh...') #7 /home/aua/public_html/index.php(74): textpattern() #8 {main} thrown in /home/aua/public_html/textpattern/plugins/etc_query/etc_query.php on line 589

Also, for search pagination not works website.com/?q=abc&pg=2

Last edited by bashirnoori (2024-06-15 20:39:58)

Offline

#250 2024-06-16 11:55:10

etc
Developer
Registered: 2010-11-11
Posts: 5,090
Website GitHub

Re: etc_pagination: paginate everything

That’s not enough info for debugging, sorry. Could you paste the whole <txp:etc_query ... /> block?

Offline

#251 2024-06-19 18:26:33

bashirnoori
Member
From: Afghanistan
Registered: 2012-10-02
Posts: 72

Re: etc_pagination: paginate everything

Here is the code for my menu:


            <txp:etc_query
              data='<txp:etc_tree id="12" breakclass=",activeli" />'
              replace='//a[@href="<txp:etc_url />"]@@class=active;
              //ul@@class=sm sm-clean;
              //ul@@id=main-menu;
              //li/ul@@class=hasmenu{##};
              //li/ul@@id={##};
              //li[@class="activeli"]/a@@class=active;
                //a[@href="<txp:etc_url />"]/ancestor::ul/preceding-sibling::a[1]@@class=active'
            />

Offline

#252 2024-06-19 21:08:40

etc
Developer
Registered: 2010-11-11
Posts: 5,090
Website GitHub

Re: etc_pagination: paginate everything

Very likely, the reason is that urls in the messy mode contain ; (e.g. index.php?s=a&amp;c=b), which is the default etc_query replacements separator. Try double ;;

            <txp:etc_query separator=";;"
              data='<txp:etc_tree id="12" breakclass=",activeli" />'
              replace='//a[@href="<txp:etc_url />"]@@class=active;;
              ul@@class=sm sm-clean;;
              ul@@id=main-menu;;
              //li/ul@@class=hasmenu{##};;
              //li/ul@@id={##};;
              //li[@class="activeli"]/a@@class=active;;
                //a[@href="<txp:etc_url />"]/ancestor::ul/preceding-sibling::a[1]@@class=active'
            />

Offline

Board footer

Powered by FluxBB