Problem/Motivation

In some cases it's not needed to always export menu link item of the node with all the references. Currently it's always enabled.

Let's extend the configuration form to make it optional.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nginex created an issue. See original summary.

artycal’s picture

@nginex What cases is this issue referring to? I can see some ambiguity for 2 cases:

1. The entity is referenced in a Menu link, e.g. Main Navigation > node_to_export
2. The entity references a Menu link, e.g. node_to_export contains menu_link

I assume it's for the first case, but want to make sure

nginex’s picture

It's follow up of #3352476: Add opportunity to export import content menu items with translations

The issue might have some performance impact and in many cases not needed to be enabled by default.

1. Create a node
2. On the right sidebar, click to add a menu link.
3. Export this content (menu link will be also exported)

I would add this option to existing configuration form.

This should be developed for 1.3.x first and then migrated to 1.4.x (I can do it during review)

artycal’s picture

Assigned: Unassigned » nginex
Status: Active » Needs review

mortona2k made their first commit to this issue’s fork.

mortona2k’s picture

I needed this for 1.4.x so I did a reroll.

Why not focus efforts on 1.4.x instead of 1.3.x? Users could just update if they want the new features.

nginex’s picture

Version: 1.3.x-dev » 1.4.x-dev
Assigned: nginex » Unassigned
mortona2k’s picture

I rebased 3373378-add-a-new-1.4.x onto 1.4.x to fix conflicts. Testrunner shows a phpunit failure so more adjustments are needed.

3373378-add-a-new-1.4.x-3363087-configure-export-settings contains MR69, plus work in progress on #3363087.

nginex’s picture

Issue tags: +LutskGCW24

rolodmonkey made their first commit to this issue’s fork.

rolodmonkey’s picture

I updated merge request 69 with the latest from 1.4.x and fixed the merge conflicts.

I am going to try using a patch from merge request 69 locally, but I will need other people to review this and see if it is ready.

rolodmonkey’s picture

I fixed a few minor issues left over from the merge request.

But, I did find some other problems.

First, the check for the new setting needs to be more careful, both where the default value is set in the form builder and in the ContentSyncHelper->nodeAllowMenuLinkExportEnabled()
If the configuration is not set at all, then it should default to true. Even though it is supposed to be set to true in an update hook, there are cases where that update hook can immediately be overridden; for instance by importing the old config immediately after the update.

Second, there are changes in single_content_sync_preprocess_links__dropbutton__operations() that look like they are from a different issue. Unless these are necessary for this issue to be resolved, they should not be included.

rolodmonkey’s picture

Status: Needs review » Needs work
rolodmonkey’s picture

Status: Needs work » Needs review

I re-rolled this against the latest code.

I also removed the code that was inside single_content_sync_preprocess_links__dropbutton__operations() since that had already been merged.

nginex’s picture

Status: Needs review » Closed (duplicate)

Thanks for all the hard work, but I noticed that it was already done as part of #3511539: Recursion takes too much memory compared to earlier versions (1.4.6 or earlier). So I'm closing this issue as duplicated