Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Problem with wp_list_pages and Role Scoper: 1.1.2

UserPost

9:55 am
January 1, 2010


ssslugano

Member

posts 5

1

Happy new year to everyone ;)

Since I updated to the last version of Role Scoper (version 1.1.2) I've a problem with wp_list_pages.

In my website http://www.ssslugano.ch I use a wp_list_pages to generate the main menu, with the code:

<?php wp_list_pages("title_li=&depth=1&sort_column=menu_order&exclude=XX"); ?>

XX is a comma-separated list with some pages that are hidden

If a guest or an administrator come in the website everything is OK and the menu is:

<div id="menu">
<li><a href="/">Home</a></li>
<li class="page_item page-item-2″><a href="http://www.ssslugano.ch/ssslugano" title="SSS Lugano">SSS Lugano</a></li>
<li class="page_item page-item-11″><a href="http://www.ssslugano.ch/formazione" title="Formazione">Formazione</a></li>
<li class="page_item page-item-181″><a href="http://www.ssslugano.ch/servizi" title="Servizi">Servizi</a></li>
<li class="page_item page-item-272″><a href="http://www.ssslugano.ch/gallery" title="Gallery">Gallery</a></li>
<li class="page_item page-item-19″><a href="http://www.ssslugano.ch/area-soci" title="Area Soci">Area Soci</a></li>
</div>

but when an Subscriber come in the page see the menu followed by a list of post's title (that Subscriber can see in the blog), like:

<div id="menu">
<li><a href="/">Home</a></li>
<li class="page_item page-item-1″><a href="http://www.ssslugano.ch/chiamata-allarme" title="Chiamata d&#8217;allarme">Chiamata d&#8217;allarme</a></li>
<li class="page_item page-item-2″><a href="http://www.ssslugano.ch/ssslugano" title="SSS Lugano">SSS Lugano</a></li>
<li class="page_item page-item-7″><a href="http://www.ssslugano.ch/nuovo-sito-internet" title="Nuovo sito internet">Nuovo sito internet</a></li>
<li class="page_item page-item-11″><a href="http://www.ssslugano.ch/formazione" title="Formazione">Formazione</a></li>
<li class="page_item page-item-149″><a href="http://www.ssslugano.ch/trasloco-per-nuova-sede" title="Trasloco per nuova sede">Trasloco per nuova sede</a></li>
<li class="page_item page-item-181″><a href="http://www.ssslugano.ch/servizi" title="Servizi">Servizi</a></li>
<li class="page_item page-item-678″><a href="http://www.ssslugano.ch/panettonata-natalizia-2009″ title="Panettonata natalizia 2009″>Panettonata natalizia 2009</a></li>
<li class="page_item page-item-701″><a href="http://www.ssslugano.ch/uscite-allenamento-sub" title="Uscite allenamento sub">Uscite allenamento sub</a></li>
<li class="page_item page-item-731″><a href="http://www.ssslugano.ch/allarme-interventi-urgenti" title="Allarme interventi urgenti">Allarme interventi urgenti</a></li>
<li class="page_item page-item-839″><a href="http://www.ssslugano.ch/situazione-transitoria-nella-sede-sss-lugano" title="Situazione transitoria nella sede SSS Lugano">Situazione transitoria nella sede SSS Lugano</a></li>
<li class="page_item page-item-924″><a href="http://www.ssslugano.ch/concorso-della-sss-per-lavvento" title="Concorso della SSS per l&#8217;avvento">Concorso della SSS per l&#8217;avvento</a></li>
<li class="page_item page-item-932″><a href="http://www.ssslugano.ch/buone-feste" title="Buone Feste">Buone Feste</a></li>
<li class="page_item page-item-1034″><a href="http://www.ssslugano.ch/uscite-allenamento-sub-uas-gen-feb-2010″ title="Uscite allenamento sub (UAS) gen-feb 2010″>Uscite allenamento sub (UAS) gen-feb 2010</a></li>
<li class="page_item page-item-1037″><a href="http://www.ssslugano.ch/cerimonia-1%c2%b0-gennaio-2010″ title="Cerimonia 1° gennaio 2010″>Cerimonia 1° gennaio 2010</a></li>
<li class="page_item page-item-1039″><a href="http://www.ssslugano.ch/attivita-operativa-sss-sezione-lugano" title="Attività operativa SSS Sezione Lugano">Attività operativa SSS Sezione Lugano</a></li>
<li class="page_item page-item-272″><a href="http://www.ssslugano.ch/gallery" title="Gallery">Gallery</a></li>
<li class="page_item page-item-19 current_page_item"><a href="http://www.ssslugano.ch/area-soci" title="Area Soci">Area Soci</a></li>
</div>

I don't understand why… in fact the link generated here aren't good, because the permalink for blog's post is http://www.ssslugano.ch/news/title and not http://www.ssslugano.ch/title and before the update everyone saw the right menu, like the first one.

If can be usefull: I use last WP version (2.9) and if I disable the Role Scope plugin everything is good (but I need it to hidden some content (a blog category) to unregistred user.

I hope you can help me :-)

Thank you very much and kind regards,

Marco

10:28 am
January 1, 2010


ssslugano

Member

posts 5

2

I downgraded to 1.0.8 until I wait an answer and the menu works correctly. So it's 100% a problem of the version 1.1 / 1.1.2. I hope the information above help you to find the bug and fix it in next version.

Kind regards,

Marco

12:27 pm
January 1, 2010


Kevin

Admin

posts 2503

3

Thanks for letting me know. I'm sorry to hear that Role Scoper is no longer handling your custom wp_list_pages call correctly, and will look into it on Monday.

1:00 pm
January 1, 2010


ssslugano

Member

posts 5

4

wow you're so fast on reply :) thank you too for your plugin and support!

2:28 pm
January 4, 2010


Kevin

Admin

posts 2503

5

So the URLs are wrong for both guest and subscriber?

Is that your only problem, or is there some problem with the selection of pages included in the list?

2:36 pm
January 4, 2010


ssslugano

Member

posts 5

6

Only subscriber have this problem, guest and administrator see the normal menu. I think because guest and admin have no rules (admin in any case see everything), but subcribers with your script can see a category of the blog (internal communication).

10:14 am
January 6, 2010


Kevin

Admin

posts 2503

7

ssslugano said:

when an Subscriber come in the page see the menu followed by a list of post's title (that Subscriber can see in the blog)…

…Only subscriber have this problem, guest and administrator see the normal menu.

Do you mean that Subscribers see the normal short page list AND the long page list? Or just one list with too many pages included?

ssslugano said:

in fact the link generated here aren't good, because the permalink for blog's post is http://www.ssslugano.ch/news/title and not http://www.ssslugano.ch/title and before the update everyone saw the right menu, like the first one.

The links (which you quoted above) in the "correct" short menu look the same as those in the "incorrect" Suscribers menu. Listed page links are generated by the WordPress function get_page_link(), which considers your "Blog address" setting. Role Scoper does not modify or filter that setting; are you sure it was the Role Scoper update that changed your page permalinks?

11:06 am
January 6, 2010


ssslugano

Member

posts 5

8

Kevin said:

when an Subscriber come in the page see the menu followed by a list of post's title (that Subscriber can see in the blog)…

…Only subscriber have this problem, guest and administrator see the normal menu.

Do you mean that Subscribers see the normal short page list AND the long page list? Or just one list with too many pages included?

The first code I posted is the right one, the second is the "same code" viewed by subscriber (so only this, isn't doubled).

in fact the link generated here aren't good, because the permalink for blog's post is http://www.ssslugano.ch/news/title and not http://www.ssslugano.ch/title and before the update everyone saw the right menu, like the first one.

The links (which you quoted above) in the "correct" short menu look the same as those in the "incorrect" Suscribers menu. Listed page links are generated by the WordPress function get_page_link(), which considers your "Blog address" setting. Role Scoper does not modify or filter that setting; are you sure it was the Role Scoper update that changed your page permalinks?

The links to the pages are correct, but the right permalink to the post need /news/ but doesn't matter because in the blog are correct and when I use Role Scoper 1.0.8 (or the new one when you find the bug Wink) nobody see post's title in the menu.

For example the link:

<li class="page_item page-item-11″><a href="http://www.ssslugano.ch/formazione" title="Formazione">Formazione</a></li>

is correct because it's a page /formazione but the link:

<li class="page_item page-item-7″><a href="http://www.ssslugano.ch/nuovo-sito-internet" title="Nuovo sito internet">Nuovo sito internet</a></li>

don't exist, the real permalink to the post "Nuovo sito internet" is

<a href="http://www.ssslugano.ch/news/nuovo-sito-internet" title="Nuovo sito internet">Nuovo sito internet</a>

Thank you again for your patience Cool

7:42 am
June 29, 2011


Kevin

Admin

posts 2503

9

This was fixed in Role Scoper 1.1.3


About the Agapetry forum

Currently Online:

14 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1248

Posts: 5657

Members:

There are 1260 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin