## page was renamed from MoinMoinBugs/PagePreSaveEventCantOverrideText = Description = ## Please read this page. Lines prefixed with ## such as this one are comments, ## you can remove them (except for those after the "Plan" section.) ## Please follow the instructions given in those comments and the text. ## After creating the bug page, please subscribe to it! We may have questions ## that only you can answer, and if you get email when your bug changes it'll ## be much faster to get it fixed since you can answer the questions! Describe the bug... == Steps to reproduce == ## Describe the steps needed to reproduce the bug. If we can't reproduce it, we probably can't fix it. 1. Add a new event plugin, data/plugin/events/show_bug.py, with contents {{{ def handle(event): if event.name == "PagePreSaveEvent": event.new_text = "replace the old text!" }}} 2. Edit a page and save it 3. The page text should be saved as "replace the old text!" rather than the actual saved text, and it isn't. == Component selection == ## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ... * event handling * http://paste.pocoo.org/show/164338/ is a patch from dreimark on IRC == Details == ## If a traceback is not available, please fill in the details here: || '''!MoinMoin Version''' || 1.8.4 || || '''OS and Version''' || Ubuntu 9.10 || || '''Python Version''' || 2.6.4 || || '''Server Setup''' || || || '''Server Details''' || || || '''Language you are using the wiki in''' (set in the browser/UserPreferences) || || == Workaround == ## How to deal with the bug until it is fixed Not clear, other than patching Moin with the above patch. = Discussion = some on #moin {{{#!highlight irc 18:59 < ThomasWaldmann> i don't think the event system was designed to modify the saved text 18:59 < ThomasWaldmann> so it might be rather a missing feature than a bug 19:00 < ThomasWaldmann> but as soon as one starts to modify savetext, order gets important (and I don't think we currently have any special order or a way to influence it) 19:03 < dreimark> if lock instead of warn is used parallel editing of the same page is impossible }}} = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: ---- ## If you are a moin core developer, replace the category to Category* in these cases: ## Category MoinMoinNoBug - if this is not a bug. ## Category MoinMoinBugConfirmed - if you can confirm the bug on current code. ## Category MoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinBug