Hi,

I have a current web project wich contains a 150 websites managing by the module domain. I know what you're already thinking, 150 is way too much but what can i say, it was like this when i resumed this project :)

The main problem i have is with 150 websites, come 150 menus. We have noticed a lot of performance issue on node editing. We have discovered that Drupal is loading the 150x menus and chech the access for each link.

I tried to uncheck each menu per domain in the mass editing page (domain batch) but the settings are not saved. I disabled all the contrib module (in case of a conflic) but the result is still the same.

Any idea or suggestion ?

Thanks for your help

Database : MySQL 5
Php : 5.5
Drupal core version : latest
modules : domain access, domain configuration, domain content

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jibus created an issue. See original summary.

agentrickard’s picture

There are two problems here:

Issue #1

This sounds like Domain Menu, which automatically creates menus for each domain. Check to see if that is installed.

The problem here is in the menu count more than the domain count, Menu loading is very expensive.

If the site isn't using Domain Menu, you would need some way to tell core to only load certain menus on a specific domain. That's outside the scope of this module, but I do have some ideas how you could do it.

Try the Domain Menu route first, and then let's see what we have to do.

---

Isssue #2

What do you mean, "I tried to uncheck each menu per domain in the mass editing page (domain batch) but the settings are not saved."?

Is it that they are not saved or that they have no effect?

Can you post some screen shots of that?

Jibus’s picture

Hello Agentrickard,

Thank you for your response.

Issue #1

The website use the domain menu block module. I thought maybe implement a custom module to re-load the menu by setting menu_override_parent_selector to 1, but without success. If you have any suggestions, there're more than welcome :)

Issue #2

Exactly, settings are not saved.

From the batch content type available page. The page is just reloading (without any error / warning message) and all the menus attached to the content type / domain are stillchecked. I tried to disable all the contrib module ( i was thinking of a conflict with an another module) but the result is still the same.

agentrickard’s picture

I cannot reproduce error #2.

I wonder if it's a form handling issue within PHP and max_input_vars. Because 150 domains x 150 menus would be 22,500 form elements and might cause a silent error. (https://www.php.net/manual/en/info.configuration.php#ini.max-input-vars)

Maybe check your PHP errors logs (and Drupal's watchdog) for some indication of the error.

agentrickard’s picture

On issue #1 -- it has been a loooooong time since I looked at Domain Menu Block, but it should be dynamically altering the available menus per domain.

Look in domain_menu_block_init(), which does not seem to be working, since variable_get('domain_menu_block_content_menu', array()) is returning empty.

agentrickard’s picture

Here's a potential patch for Domain Menu Block.

After installing the patch, go to 'admin/structure/domain/domain_menu_block' and check the 'Preselect menu options when creating nodes' option.

That should only load one menu when editing a node.

agentrickard’s picture

FileSize
2.57 KB
Jibus’s picture

Hi,

Thank you for response.

Applied the patch and notice a huge incresase of performance (1sec loading instead of 30-60sec). Great ! :)

In node edit, one menu is now only loaded (confirmed by devel).

We continue the tests. If it's concluded. Will you push the patch to 7.x brand of Domain Menu Block ?

I still have to check the max_input_vars settings

agentrickard’s picture

Yes. We will move this issue to that queue and spin up a new release.

I think that feature was working at one point, but got lost in a refactor.

Jibus’s picture

Hello,

We push in production and everything is working fine. Thank you again !

I think it's ok now to move this issue to the domain menu block module.

agentrickard’s picture

Project: Domain » Domain Menu Block
Version: 7.x-3.16 » 7.x-1.x-dev
Component: - Domain Settings » Code
Category: Support request » Bug report

Moving to proper queue.

  • agentrickard committed c48648b on 7.x-1.x
    Issue #3100688 by agentrickard, Jibus: Unable to save mass configuration...
agentrickard’s picture

Status: Active » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.