BUG: menu_title not displayed in certain instances All in One SEO Pack Troubleshooting Forum

The support forums have a new home! Please visit All in One SEO Pack's new residence at Semper Plugins to purchase a support plan.

Please consider registering
guest

Log In

Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
BUG: menu_title not displayed in certain instances
August 16, 2010
11:40 am
bobdinkel
New Member
Forum Posts: 1
Member Since:
August 12, 2010
Offline

I believe I've found a bug. The problem is related to displaying the "menu title" when "link_before" and "link after" values are specified as parameters of the "wp_list_pages" function.

In most instances the "link_before" and "link_after" values are ignored and the value given for the "menu_title" is displayed. That sounds less like a bug and more like a design choice. However, when the "link_before" and "link_after" values are HTML like "<i>" and "</i>" respectively, the "menu_title" isn't displayed in lieu of the original page title.

The underlying issue there is that the regex used in the "aioseop_list_pages" function no longer matches when there are tags within the body of the anchor. In the code there's a comment mentioning that the regex originally came from Sarah G's Page Menu Editor plugin so I went to original to see whether it had been updated. It has! I swapped in the updated regex and the plugin started working as expected.

I'm using version 1.6.12.1

I changed line 699 of "all_in_one_seo_pack.php" from:
$pattern = '/<li class="page_item page-item-(\d+)([^\"]*)"><a href=\"([^\"]+)" title="([^\"]+)">([^<]+)<\/a>/i';
to:
$pattern = '@<li class="page_item page-item-(\d+)([^\"]*)"><a href=\"([^\"]+)" title="([^\"]+)">(.*?)</a>@is';

Thanks!

Forum Timezone: America/New_York

Most Users Ever Online: 205

Currently Online:
33 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

romiojuliat: 102

yaoming987: 50

jintuy: 50

miki1986: 33

newshow: 28

karen1234: 27

Member Stats:

Guest Posters: 0

Members: 6356

Moderators: 3

Admins: 4

Forum Stats:

Groups: 5

Forums: 23

Topics: 1546

Posts: 3450

Newest Members: carofern@cisco.com, pronto, jessie, pbaylies, ninaeast, freda

Moderators: davecashmore (2), aaron (5), tempadmin (0)

Administrators: WordPress Professional (442), hallsofmontezuma (202), onefinejay (10), stevemortiboy (4)