using MM 2.0 with 8.5.9, will be progressing to 8.5.12

Permalink Browser Info Environment
I have been testing MM 1.65 and MM 2,
When upgrading to MM2 from a working menu I have found that the Home menu has the url for the current folder rather the /
This is currently stopping me from launching a new site. I have now reverted to MM1.65
Because MM has so many config options I am not sure if this is just incorrect settings or a bug.

Thanks
Martyn

Type: Ticket
Status: In Progress
FaganSystems
View Replies:
jb1 replied on at Permalink Reply
jb1
Hi Martyn,
I just took a closer look at the PHP source code for the menu generation in V2.0, and it seems the home page link code looks ok to me. It should generate the URL based on Concrete's core "getLinkToCollection" function.

The only 2 scenarios I can imagine this might behave differently are:
1) The home page is not the top level on the site - like a multilingual site. Do you have the multilingual add-on installed/activated?
2) The home page is an external URL. I've never tried doing this, and not even sure if it's possible in Concrete.

Is your site live so I can log into it and take a look? Please only send the details via PM as it's not secure on a public ticket like this.

Once I can replicate the behaviour you're experiencing, then I can nail down the cause and resolve it.

Much appreciated.

JB
FaganSystems replied on at Permalink Reply
FaganSystems
HI jb,

The site is running 8.5.9 currently so no multisite, and the home page is just the root page or /

I will build a clean 8.5.9 site with only the theme and MM2.0 installed, if this is working then it must be another interaction, but there isn't much else on the site,
I can't put the development site live, it's a commercial site in development.

I will let you know the details along with admin creds.

Thanks
Martyn
jb1 replied on at Permalink Reply
jb1
The other way to check if Javascript from another addon (or the theme) is if you look at the page source code (by right-clicking on the background of the page and choose "view page source". And if it's showing the correct URL for the home page, then compare it to the same link using right-click and "inspect" for the Chrome inspector. If the URL has changed then it's telling us that Javascript is at play here. The page source will be exactly what the server delivers to the browser, but then Javascript has a chance afterwards to modify it.

I'll keep an eye out for your DM.

JB
FaganSystems replied on at Permalink Reply
FaganSystems
Hi
Just been checking outstanding issues and realised that this is still in progress, further checking shows that my reply shown below never made it to you.

I have just finished building a test system, which I will push to my cloud hosting today and advise the details.

Details sent to you directly

In summary, installed
Concretecms 8.5.9 full site

Installed megamenu 1.65

Worked as expected
Installed theme stucco
Activated theme
Worked as expected

Ungraded to megamen2.0
Encountered issues
What I have found:-
On Home page worked
Select any other page, home button points to that page

Also noticed that when editing the block Edit window has zero height need to pull down to expand As you progress through the tabs the first tab persists and others are added below

Thanks
Martyn
Enviroment
# concrete5 Version
Core Version - 8.5.9
Version Installed - 8.5.9
Database Version - 20220319043123

# Database Information
Version: 8.0.31-0ubuntu0.20.04.1
SQL Mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

# concrete5 Packages
Mega Menu (2.0), Stucco (2.1.6)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
nginx/1.23.2

# Server API
fpm-fcgi

# PHP Version
7.4.33

# PHP Extensions
calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, libxml, mbstring, mongodb, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 6400
log_errors_max_len - 1024
max_file_uploads - 1500
max_input_nesting_level - 64
max_input_time - 6400
max_input_vars - 512
memory_limit - 1536M
post_max_size - 1536M
upload_max_filesize - 1536M
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
unserialize_max_depth - 4096
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
jb1 replied on at Permalink Reply
jb1
Hi Martyn,
Thanks for the update. I've been aware of the editor interface height being too small and requiring a resize. I haven't found the solution to that - unfortunately it's been like that for a while on most systems. I've got to revamp the editor interface for V9 and I'm hoping that will solve that issue.

For the home page link, if you're able to DM me with the details of this cloud site (Dashboard URL, login details) then I can take a closer look at what is going on to cause this strange behaviour.

JB
jb1 replied on at Permalink Reply
jb1
Sorry I didn't see your DM until after I replied to the ticket. I've had a look through the site and apart from the strange behaviours on the editor interface (the first tab is displaying even after navigating to subsequent tabs - I think this is an issue between V8 and V9), I think I've found a solution. But since I don't have a V8 dev site handy to test it, can you please try modifying the following file for me on your site:

/packages/jb_megamenu/blocks/jb_megamenu/controller.php

line 1016 should look like this:
$niRow['cPath'] = Loader::helper('navigation')->getLinkToCollection($tc1);


Please replace it with this:
$niRow['cPath'] = Core::make('helper/navigation')->getLinkToCollection($tc1);


This is a newer method for creating links and the same one used for "non home" links in the navigation, which is why it's different than the rest.

If that works fine for you, please confirm and I'll upload that fix to the marketplace.

JB
FaganSystems replied on at Permalink Reply
FaganSystems
HI jb,

I updated the code on the test environment to 2..0.1 and successfully applied the change; sadly, it didn't help or change the behaviour.

While looking through the code, I found that in

/jb_megamenu/blocks/jb_megamenu/controller.php

I found in this function that the variable $stopAt does not appear to b defined at any level and in fact doesn't appear to be defined in the project.

function populateParentIDArray($cID) {
// returns an array of collection IDs going from the top level to the current item
$db = Loader::db();
$cParentID = Page::getCollectionParentIDFromChildID($cID);
if ($cParentID > -1) {
if ($cParentID != $stopAt) {
if (!in_array($cParentID, $this->cParentIDArray)) {
$this->cParentIDArray[] = $cParentID;
}
$this->populateParentIDArray($cParentID);
}
}
}

Have a Great Christmas.

Martyn
jb1 replied on at Permalink Reply
jb1
Ok, I've looked a bit further around the site and noticed the block cache and overrides cache is turned on, so I've turned that off for now. It's best to do that when developing and building a site. Then turn it on once you're ready to go live. That way, any code changes are reflected straight away and Concrete's caching system doesn't get in the way.

This is the page to turn it back on:
/index.php/dashboard/system/optimization/cache (first 5 fields on this form)

That's an interesting thing you found with the unused variable. I'm guessing it was borrowed from the old "autonav" block and then not used. The default option for the Mega Menu is to show all pages (which your site is doing), and that doesn't use that particular function you mentioned, so it wouldn't have any effect on the home page link.

I'm going to have to get a development environment setup on my computer with that particular version of Concrete CMS to be able to replicate and troubleshoot it further. In the meantime, there's one last thing to try. I see you've got 8.5.9 and the latest version of the CMS is 8.5.12 (https://www.concretecms.org/download). There's quite a few core bug fixes between those versions, so in the off chance that it could be a core bug causing this, I'd recommend upgrading to that version. It also ensures you have the latest version with all the security patches which is best practice. Once you've tried that, please let me know if there's any change to the behaviour.

Hope you have a wonderful festive season too.

JB
FaganSystems replied on at Permalink Reply
FaganSystems
Hi, As you suggested, I have switched off all of the caching entirely, I have upgraded to 8.5.12 but this is still showing the navigation issue.

Hope your Christmas is going well.

Martyn
jb1 replied on at Permalink Reply
jb1
Thanks for letting me know. I'll get that setup on my end so I can replicate the issue and track down the cause. Will keep you posted in the coming days.

JB
jb1 replied on at Permalink Reply
jb1
Ok, I think I've nailed it this time.
I've modified the way the link is generated for the home page, and also tested it on both V8 and V9 installations (latest versions).
I found that on V8 the default setting for a fresh install is to hide the "home" page from the navigation using the core page attribute. That was not intuitive and took a while to discover - sometimes the simplest things are right under our nose. I checked your site install and the home page attribute is already turned off (so that wasn't a factor for you).
I took the time to also troubleshoot the editor window height and found the issue lies with a bug in the core colour picker fields. ConcreteCMS has fixed those in V9, and when I tested it on there, with a few code tweaks, it all looks ok.
My previous update to make the block compatible with V9 was not thoroughly tested enough on V8, which introduced the bug. I think I've squashed those now.

The updates have been uploaded to the marketplace (as V2.0.1) so if you download that and overwrite the files on your server, it should work fine. THere's no need to uninstall/update the package from the dashboard as no database changes were made.

Once you've tried it out, please let me know how it goes.

JB
FaganSystems replied on at Permalink Reply
FaganSystems
Hi,

I am pleased to confirm that the home link is working well now,
I understand the issues with the editor height. But have you tried changing/adding the height attribute with a value of maybe 1vh or part of.
It isn't a trouble to me but would improve the user experience.

Hope you had a good Christmas.

Best
Martyn
jb1 replied on at Permalink Reply
jb1
Great, glad to hear that.

Yes, I tried a few workarounds like that but none of them worked, as I'm only able to format the content within the modal window, not the modal window itself. That is recalculated by Concrete, and as it happens before the colour pickers are fully loaded, it's throwing out the window height calculation.
Yeah, I see the same annoyance too, but fortunately it's not a major issue and usually once the Mega Menu is setup, most sites don't need to change it very often.

I'm moving some old sites at the moment to V9 and it's a big job. But for your site, it would be worthwhile keeping that option open for the future, as it will make upgrades much easier (I'm expecting Concrete will drop support for V8 soon enough).

JB

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.9
Version Installed - 8.5.9
Database Version - 20220319043123

# Database Information
Version: 8.0.31-0ubuntu0.20.04.1
SQL Mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

# concrete5 Packages
ExchangeCore Dev Tools (1.0.2), Login/Logout Link (1.0), Mega Menu (1.6.5), Stucco (2.1.6)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
nginx/1.23.2

# Server API
fpm-fcgi

# PHP Version
7.4.33

# PHP Extensions
calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, FFI, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, libxml, mbstring, mongodb, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 6400
log_errors_max_len - 1024
max_file_uploads - 1500
max_input_nesting_level - 64
max_input_time - 6400
max_input_vars - 512
memory_limit - 1536M
post_max_size - 1536M
upload_max_filesize - 1536M
mbstring.regex_retry_limit - 1000000
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
unserialize_max_depth - 4096
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.