Description

Some links to help pages point to a wrong subwiki in a localized wikifarm setup with shared cache directories.

Steps to reproduce

  1. wikifarm setup with shared user, cache and underlay directories (user_dir, cache_dir, data_underlay_dir are defined in farmconfig.py; they are not defined in the subwiki configuration)
  2. german (probably other as well) localization
  3. When editing a page in text mode, at the bottom of the page a box is displayed with syntax hints. Within this box there are two links to help pages:
    • Weitere Hilfe unter HilfeZumEditieren oder SyntaxReferenz.

    These two links point most of the time to the appropriate help pages of an other wiki in the farm. This "other wiki" changes over time. Because not every user have read access in every wiki, this is annoying. This is the only place, where I discovered this effect. Other links to help pages are correct. But I didn't searched systematically for this. If I switch my language setting from german to english, this effect disappears: the two links point to the help pages within the wiki, which I'm editiing.

Example

screenshot.png

The link SyntaxReferenz points to http://wiki01/hf/SyntaxReferenz instead of http://wiki01/default/SyntaxReferenz. Some hours later it may go to http://wiki01/prp/SyntaxReferenz, which is another subwiki in the farm. The same happens with the link HilfeZumEditieren.

Component selection

Details

Workaround

I changed all ACLs in the underlay directory in a way, that everyone has read access (#acl ALL:read) irrespecitve of the parameter 'acl_rights_default' in the subwiki configuration files. This doesn't solve the wrong links, but all users can read the help pages in all wikis and they don't get annoying "access denied" errors.

An alternative would be, using separate cache directories. But the session information is saved within the cache directory. With an own cache directory for each subwiki one has to login to each subwiki separately. With a shared cache directory a single logon is sufficient to access all subwikis. Of course only if the ACLs allow this.

An improvment of the second workaround could be, using symbolic links for the directory data/cache/__common__/session in all subwikis. But I didn' tried this.

Discussion

I applied the patch http://hg.moinmo.in/moin/1.8/rev/04f3cfbf446a to our MoinMoin 1.8.1 installation. This doesn't solve the issue. Even after executing moin ... maint cleancache and also after removing the whole cache directories wrong links to help pages are displayed.

I noticed one further behaviour. After every restart of moin (apache + fastcgi), the first time when displaying a page with these links (text editor), they point to the correct wiki. When editing a page in one of the other subwikis afterwards, these links point to the first wiki. After a further moin restart and reload of the last edited page in the browser the links are correct. Until I edit a page in the next wiki...

Is there some kind of in-memory cache, which applies here?

-- IngoRogalsky 2009-01-28 21:58:20

You need to stop moin, clean the cache, start moin on the patched code. That should solve the problem, right? -- ThomasWaldmann 2009-01-28 23:54:00

Unfortunately no. Yesterday, I cleared the cache (without stopping moin) and restarted moin. I tried it again, now and did this exactly as you advised. To be on the safe side, I removed all cache direcotories instead of using moin ... maint cleancache and I deleted MoinMoin/i18n/__init__.pyc. The behaviour is the same as before. -- IngoRogalsky 2009-01-29 11:22:08

I had a deeper look into the i18n source and found that chaning the on-disk cache to "per wiki" is not enough. It currently uses global in-memory data structures (not per-wiki), thus this needs to get fixed also. This might take more time, maybe until 1.9. -- ThomasWaldmann 2009-01-29 11:46:45

To answer your question, which you deleted in the meantime: moin creates the i18n directory in the cache directory of the first wiki, I enter and only there. There is no i18n directory in the cache directory of other wikis nor in data/cache/__common__. -- IngoRogalsky 2009-01-29 12:13:04

Yes, because it is cached in memory. If you restart moin and enter another wiki first, it will create the cache there.

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/WrongLinksToHelpPagesInFarm (last edited 2009-01-29 18:10:47 by ThomasWaldmann)