Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#313 2020-01-04 00:44:04

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Hi Graeme,

Yep, your summation is correct – the sort value is maxed out at 255. Not sure why I picked that limit – it makes the fix a bit awkward (the db column size will need to change, amongst other things).

Am currently preparing for bushfires and will then be travelling. Sorry but it might take a while. I’ll be in contact.

Offline

#314 2020-01-04 09:06:59

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,734
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

gomedia wrote #320812:

Am currently preparing for bushfires and will then be travelling. Sorry but it might take a while. I’ll be in contact.

Adi, best of luck that you are spared the horrors that many of your compatriots are experiencing at the moment 🙏.


TXP Builders – finely-crafted code, design and txp

Offline

#315 2020-01-04 11:00:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

gomedia wrote #320812:

Am currently preparing for bushfires and will then be travelling. Sorry but it might take a while. I’ll be in contact.

We have been following them from this side too, as some of our friends there have been afected. It is a nightmare!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#316 2020-01-04 17:51:27

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,094
Website Mastodon

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

jakob wrote #320817:

Adi, best of luck that you are spared the horrors that many of your compatriots are experiencing at the moment 🙏.

Adi – stay safe.


…. texted postive

Offline

#317 2020-01-12 20:52:48

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 177
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Adi

Man, I know how bushfire prone the Great Ocean Road area is. Just hope you get some rain through to dampen things down. Seems that’s the only way it will escape.

gomedia wrote #320812:

Yep, your summation is correct – the sort value is maxed out at 255. Not sure why I picked that limit – it makes the fix a bit awkward (the db column size will need to change, amongst other things).

I believe something happened with the drag and drop function that has left a gap between sort value 62 and 255.

You will note that something has happened with the 62 entry in the menu list, that now lies outside the <ul>. 61 is the last one in the correct order. But maybe that is a final sort.

That last line below does not seem to be correctly formatted code. One of the reasons or consequences of this issue is that I am unable to drag and drop any items in the menu list.

This is the code that is messed up, taken verbatim from “view source” in my browser.

<li id=“larapinta-blog”><a href=“https://tramping.net.nz/larapinta-blog/”>Larapinta Trail, central Australia blog | April 2012</a><input type=“hidden” value=“61” class=“sort_value” name=“sort[larapinta-blog]”></li> <li id=“arahura-blog”><a href=“https://tramping.net.nz/arahura-blog/”>Arahura/Styx blog | December 2019</a><input type=“hidden” value=“255” class=“sort_value” name=“sort[arahura-blog]”></li> <li id=“cascade-blog”><a href=“https://tramping.net.nz/cascade-blog/”>South Westland to Queenstown blog | January/February 2019</a><input type=“hidden” value=“255” class=“sort_value” name=“sort[cascade-blog]”></li> <li id=“nlnp-2018”><a href=“https://tramping.net.nz/nlnp-2018/”>Nelson Lakes blog | December 2018</a><input type=“hidden” value=“255” class=“sort_value” name=“sort[nlnp-2018]”></li>
<li id=“angelus-blog”><a href=“https://tramping.net.nz/angelus-blog/”>Lake Angelus blog | July 2019</a><input type=“hidden” value=“255” class=“sort_value” name=“sort[angelus-blog]”></li> </ul> <input type=“hidden” value=“62” class=“sort_value” name=“sort[blog]”></li>

For some reason the plugin is not assigning a correct sort value to those last four, most recent, menu items. They should be at the top of the list. I am unable to drag them into the correct order. They aren’t even in the order I added them.

I’m just wondering if I need to just reinstall the plugin. Or somehow otherwise get the correct sort value assigned.

This is the code for the navigation, but any issue here doesn’t explain the lack of drag and drop.:

<!— navigation blogs—>
<nav role=“navigation”> <txp:adi_menu menu_id=”“ class=“menu” active_class=“current” current_children_only=“1” parent_class=”“ sort=“adi_menu_sort” articles=“1” active_articles_only=“1” article_attr=‘sort=“posted asc” status=“live”’ /> </nav>

Or maybe something has changed with the serving software.

Textpattern version: 4.7.1
PHP version: 5.6.27
jquery: 1.11.2

And now I too am taking off for the hills.

Thanks for this plugin and assistance.

Offline

#318 2020-01-29 03:53:58

detail
Member
From: geez, I seem to be in NZ
Registered: 2010-07-13
Posts: 177
Website

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

detail wrote #321052:

Thanks for this plugin and assistance.

Just a note for anyone following this thread. This has been easily resolved, at least on my part, by Adi updating a beta version I was using to deal with 4.7 changes.

This is an extremely powerful plug-in, the ability to create numerous sub-sections, and change around the names and order of anything on a website’s menu.

That is useful when dealing with any textpattern website that has the need for many different sections, and sub-sections. This website I’ve been resolving has almost 1200 pages currently, with 14 main sections, with one of those sections having 39 sub-sections! Each sub-section has up to 85 individual articles.

So, adi_menu is a beast!

Thanks for all your work Adi!

Offline

#319 2020-01-29 10:01:20

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Thanks for everyone’s best wishes. We moved from the Great Ocean Road in Victoria – which was meant to be the most riskiest for bushfires – to supposedly safe-ish NSW. The irony! It got a bit hairy at one point but currently we’re alright. About 60% of our shire is burnt out. Fire season is not yet over unfortunately.

For the record, adi_menu-1.4beta13 is the latest version that copes with newer TXP releases.

Offline

#320 2020-12-08 09:25:02

Bruce Bowden
Member
From: Melbourne, Australia
Registered: 2020-10-22
Posts: 28

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

I have used adi_menu on my first project. Worked perfectly and did exactly what I wanted.
Project no 2 is not so good. The only change is going from Textpattern 4.8.3 to 4.8.4.

Installing adi_menu v1.4beta13 on a clean install with only a couple of sections added gives the following errors when you try to go to Presentation-> menu:
First:
User_Error “Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation ‘=’”.

Then:
Warning “mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given”.

I might have to switch back to 4.8.3.

It’s running on a Raspberry Pi, not sure what software versions but everything is new this year.

(The Raspberry Pi and Textpattern have been my Melbourne lockdown projects.)

Thanks
Bruce

Offline

#321 2020-12-08 09:45:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,456
Website GitHub

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Hmmm, quite why this would change between versions when there’s nothing we’re doing between 4.8.3 and 4.8.4 in terms of collation is mystifying. Maybe there’s something different in the server setup or the config.php collation this time around?

Failing that, from your favourite MySQL client, take a look at the connection and database collations:

show session variables like '%collation%';
show variables like "collation_database";

and the tables or columns of various tables:

show table status;
show full columns from adi_menu;

If you have a different collation on the adi_menu table or some of its columns compared with (say) your txp_section table then that might account for the issue.

Short of hacking the plugin to use a collation-independent comparison (such as BINARY or forcing a specific COLLATE method), can you manually alter the offending tables so the collations match?

ALTER DATABASE yourdb DEFAULT COLLATE utf8mb4_general_ci;
ALTER TABLE some_table CONVERT TO CHARACTER SET utf8 COLLATE utf8mb4_general_ci;

Or something along those lines? Backup first, of course :)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#322 2020-12-08 10:19:11

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Bruce Bowden wrote #327350:

(The Raspberry Pi and Textpattern have been my Melbourne lockdown projects.)

I’d like to hear more about this. Would you be prepared to start a new thread and tell us the processes you used for that?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#323 2020-12-08 20:35:50

Bruce Bowden
Member
From: Melbourne, Australia
Registered: 2020-10-22
Posts: 28

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Ok,
Nothing like posting on the forum to make you focus on the problem.

It turns out that I never had adi_menu running on the Raspberry Pi. That was added to the site after I moved the site to the “live” server.

4.8.4 is not the problem as a fresh install of 4.8.3 on the Pi shows the same errors.

So my problem really is: adi_menu runs on the live server but not on the Pi.

I will spend today using Stef’s suggestions to explore the set up on the Pi. I’ll report back with any results.

Stay safe
Bruce

Offline

#324 2020-12-08 20:38:57

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_menu – section hierarchy, section menu and breadcrumb trail

Bloke wrote #327351:

Hmmm, quite why this would change between versions when there’s nothing we’re doing between 4.8.3 and 4.8.4 in terms of collation is mystifying. Maybe there’s something different in the server setup or the config.php collation this time around?

Thanks Stef. Have been thinking about this overnight and my gut feeling comment was going to be the same.

There’s a whole raft of information on stackoverflow but my brain started to melt … there’s a comment in there to the effect of “setting all tables to the same collation may not fix it”. Argh!

I’ve been wondering for years whether this issue might raise it’s ugly head one day. On my local installations standard TXP tables are created with collation utf8_general_ci but plugin tables end up with latin1_swedish_ci. I’ve got:

SHOW session variables like '%collation%';
+----------------------+-------------------+
| Variable_name        | Value             |
+----------------------+-------------------+
| collation_connection | utf8_general_ci   |
| collation_database   | latin1_swedish_ci |
| collation_server     | latin1_swedish_ci |
+----------------------+-------------------+

And because I backup/restore databases onto live hostings, the remote databases are the same. Never been a problem!

Does anyone know if there’s a right or wrong collation setup? Or even whether it’s worth worrying about if things are working?

Offline

Board footer

Powered by FluxBB