We now use Drupal for our client's sites which are often in both English and French. We used to have our own CMS with an approval step before any change would be put online and the Save as draft module is very handy to recreate that process.

Unfortunately, we've started seeing new items in the menu after making modifications to pages. At the beginning, it seemed to occur on only one of our clients' site and we've investigated. Since it seemed to affect only pages that were put in draft mode, we started there.

Here's what happens:

- As mentionned above, our sites have a French and English version.
- When saving a page as draft after making modifications, everything seems fine.
- If we go back to continue modifying that same page (or just uncheck Save as draft to publish the new version), the page is added on the first level of the menu (we use the primary links), but in the other language!! It seems to create a duplicate link to the page since the original link is still in the right place in the menu.

Looking more closely, we saw that when we return to a page in draft mode, the Menu settings that were previously set, are changed: the menu link title is changed to the one from the other language and the parent item is set to the primary links. We then end up with a new English link in the French menu for example. The other day we even had the same English link added 5 times in the French menu, probably because we kept modifying that page in draft mode. As you can imagine, this is something really bad and annoying because it affects what is seen online.

Then, if we look at the primary links menu, we see that the added page is indeed there, but without a Delete button (link) at the end of the row. We can only disable it to remove it from the menu.

Is this a problem anyone else can recreate or could it be a combination of modules and/or settings we use?
Thanks for the help!

Comments

realityloop’s picture

Status: Active » Postponed (maintainer needs more info)

Are you changing menu entries as part of these node edits?

Menu entries are not stored as part of the node content, which would be why you are experiencing this, it shouldn't create duplicates though, I'd expect it to only move the menu entry.

I've not experienced this behavious on any sites that I'm using save_as_draft on, so it may be caused by another module you are using.

Amelie’s picture

No, only the body content is changed when we edit the pages.

We've also started to see some pages that are in draft mode not show the latest revision when we go look at that page in the Draft list page.
I doubt there's a limit on the number of revisions we can make while a node is in draft mode.

ADDED: I don't know if this could help find what is causing the problem, but we did a basic install on a test site, added only the Save as draft module and enabled the Locale and Content translation modules to be able to add French to the enabled languages. Then we created a couple of pages and translated one or two. Finally, we modified a page that had a translation and checked the save as draft option. When we went back to edit that page, we saw that all the menu settings were gone, but once we unchecked save as draft to publish the new revision and then went back to edit it, the menu settings were back and correct. No duplicates were created in that test, but still can see that something is happening to the menu settings when we save as draft.

Still investigating...

Amelie’s picture

Priority: Critical » Normal

FOUND IT!

There seems to be a conflict with the i18n module. We disabled each added module one after the other and once those Internationalization modules were off, Save as draft worked as it should.

Now just need to see if we actually need it, it was a module we installed at the beginning, when we were still learning how to use Drupal.
I'll keep you updated if it shows that we do need to use the i18n module.
Either way, if anyone can figure how to solve the problem to the menu, it would be great, just to eliminate the conflict between the two modules.

Thanks!

realityloop’s picture

Nice work Amelie, please update the issue as more information becomes aparent.

Also it may be worth trying the latest version of i18n 6.x-1.x-dev 2010-May-05 to see if it still happens.

If you can give me detailed steps to reproduce the issue, I'll look and see if I can resolve it.

Amelie’s picture

Just tried with the latest versions of i18n and Save as draft and the problem persists.
The conflict is precisely with the Menu translation module of i18n (managed to enable Block translation, Content type translation, Internationalization, String translation, Synchronize translations and Taxonomy translation and it was all working fine).

Here are the steps to recreate it:

1- You need a site set-up with French and English enabled (and Save as draft and i18n modules installed and enabled of course).

2- Create a couple of pages and sub-pages in French and translate them in English (they need to be active in the menu, we use the primary links).
Use a different menu link title in French and English to have a better view of what really happens.

3- Edit a sub-page in French and save it as a draft.

4- Go back to edit that same sub-page in French again, you should already see that the menu link title has been changed to its English equivalent and the parent item will have changed as well. Click Save.

5- You should now see a duplicate link added to the French menu, but with the English title. If you go in the primary links on the back-end, the duplicate link will be there without a delete link at the end of the row. You can only disable it to remove it from the menu.

6- If you edit the page again, it will add another duplicate to the menu every time you click Save.

For some reason, the problem only occurs when we edit a French page. Everything is fine when editing English pages and saving them as draft.

Hope this helps. Don't hesitate if you need more info.

Amelie’s picture

That's just great...
I created a blank test site and tried to recreate the procedure I explained above and it all works fine for some reason. Go figure!

Guess there must be something else coming into play...
Still digging and testing, because we really do need the internationalization module after all.

realityloop’s picture

hahah, don't you hate it when something like that happens..

I'll keep watching until you find a definitive reproducable cause.

Amelie’s picture

In case someone is following this, haven't had the time to dig further into the issue since my last post.
Too many other things to do.

realityloop’s picture

it's in my issue queue, so I'll see whenever you post a message.

realityloop’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Amelie, I'm closing this, feel free to re-open if it's still relevant.

Amelie’s picture

Priority: Normal » Major
Status: Closed (cannot reproduce) » Active

It's baack!
We kinda gave up on it last year being to busy, but the original problem came back recently, this time on a brand new Drupal site (our previous sites had been converted to the Drupal CMS from our in-house CMS, so we figured that transfer could have been the cause). And this time I finally managed to recreate it.

Here's the set-up:

1- From a brand new installation, add modules Save as Draft and i18n and enable the following modules:
Locale
Block translation
Content type translation
Internationalization
Menu translation
String translation
Synchronize translations
Taxonomy translation
Save as Draft

2- In Languages, add French and keep English as the default language. Then in Configure > Language negotiation, select Path prefix with language fallback.

3- In Blocks, add Language switcher and Primary links where you'd like.

4- For the Page Content type, under Workflow settings, enable Save as draft and Multilangual support with translation.

Now, let's test it:

5- Create a page in English with the parent menu as Primary links and publish it.

6- Translate that page using the translate tab to add the French translation. Be sure to use a different menu title to better see what happens.

7- Edit the French page and check Save as draft. So far so good.

8- Go back to edit that same French page, you can choose to keep Save as draft checked or uncheck it to publish it, the result will be the same.

Ok, now go see that French page in the site. You should see that a new item has been added to the menu, using the English menu title of the French page you saved as draft!

If you go back to Drupal in the Primary links menu, you will see it listed without the Delete link at the end!
The only way to get rid of it is to disable it.

In the case you kept Save as draft checked, a new menu item will be added everytime you go back to edit the draft until you publish it.

After doing some tests, it seems that the problem occurs only when the original language of the page is English, that page has menu settings and it's the French page you save as draft.

Can you recreate it on your side?
Thank you!

Amelie’s picture

Anyone who could help still following this?

WriteCo’s picture

I'm getting a similar issue when I add new content in Drupal 7, but I cannot find anything anywhere that describes the situation for 7.

I am using taxonomy categories for my custom menus and content. When a save new content with a category, the category menu item is moved from my custom menus to the primary menu. I use pathauto and global redirect. I changed the settings in pathauto for making new aliases when one already exists from deleting a current alias to "do nothing." That did not fix anything.

The menu links added to the primary links do not have a delete link, but they can be moved back to the custom menu, but not deleted, although that may be because those vocab terms have content.

WriteCo’s picture

Alright. I went in to my vocabulary settings and my content vocabulary was associated with the main menu. When I disabled the default menu, I had no menus. I changed the vocabulary to use my left custom menu and I made a new vocabulary for my right custom menu. I want to use one vocabulary for both menus so I can freely move them around, if I want.

Amelie’s picture

Version: 6.x-1.0-beta1 » 6.x-1.1

Can you elaborate on your site's settings writeco and the steps to recreate it? Are you really using the Save as draft module? It doesn't seem to be available for Drupal 7 yet.

If the same behavior is happening without the module, it could mean that the problem is elsewhere...

Just wish someone who developed/maintained this module would give some sign of life, I've been waiting for an answer for months now since I finally managed to recreate the problem. A little Christmas gift for us anyone?

realityloop’s picture

Amelie,

I'm currently on holiday, I will try my best to have a look in February, as this is when I'll next be likely to have some free time.

Amelie’s picture

Ah, thank you!
Some key points: it only occurs when the default language is English and when it's a French page that is present in the menu that you save as draft.

Have a great holiday!

Amelie’s picture

This is still a big issue. Could we have some feedback on progress?
As anyone else been able to recreate it? See #11 for the setup and conditions in which it happens.

One more bit of info: it happens also when the second language is Spanish, default language English.
This time, even when disabling the page in the menu, it's still visible. Had to create a "Can't delete" menu to transfer them into.

Can someone help please?!?

WriteCo’s picture

Sorry Amelie, I did not see that you responded to me last year. I mentioned that I had a similar issue in Drupal 7 and that this 6 issue is the only one I found close to what I was experiencing. I fixed the menu changes by disabling Taxonomy Manager.

I also recently had issues with an inability to edit nodes created by importer. I learned that the role that created node must have the same level of Wysiwyg permissions as the role editing the node.

I do not know if the issues I had are the same as what you are experiencing, but there was a similarity.

Amelie’s picture

Thanks for the info writeco.
I'll have to check with our programmer when he gets back from vacation to see if this helps pinpointing the source of the problem.
Does you site have multiple languages as well? Can you recall what you did to end up with a menu item that's impossible to delete?

And by "disabling Taxonomy Manager", do you mean disabling the whole taxonomy module?
We use taxonomy for sections in our site, so that's not something we can consider unfortunately.

realityloop’s picture

Hi All, I am not using this module actively anymore as haven't built a D6 site in over a year, I'm more than happy to test and incorporate any supplied patches though

WriteCo’s picture

Sorry, Amelie. I don't monitor responses to my posts very well. Taxonomy Manager was a separate module that changed my menus. Menu items that cannot be deleted are created outside of the menus. Check in Views, Content, Content Types, and other place that menus can be created to see if the menu is being driven by something else and disable the menu from wherever that is.

I have languages set up, but I am not using them, so there is a language field in my node table.