In Czech version the file lang.php has an extra .txt extension attached, causing language malfuction. Also there is an extra <php> line at the begining. Can you please fix it in the distribution package? Thankx (and thankx to VOP for notice)
Also in 'es' and 'pl' the files pagemove.txt and lang.php also has an extra .txt extension attached.
Currently the plugin directly deletes the old page file using the filesystem. This could wreak havoc with plugins that depend on the DW events system. To fix this, line 218 of admin.php should be:
if (@file_exists(wikiFN($opts['new_id']))) saveWikiText($ID, '', 'Deleted by PageMove plugin');
saveWikiText() will generate the proper IO_WIKIPAGE_WRITE event that signals the page was deleted.
Hi,
I cooked up a patch for DokuWiki Page Redirect Plugin, so that it's links are updated too.
You can grab the patch from here: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dokuwiki-plugin-pagemove-redirectlinks.patch
— Elan Ruusamäe 2008/02/25 17:05
looks like self links in a page are not updated. for example go to glen and try renaming it — Elan Ruusamäe 2008/02/25 16:55
hacked together some patch to solve it: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dokuwiki-plugin-pagemove-selflinks.patch
probably needs the previous REDIRECT patch too. — Elan Ruusamäe 2008/02/25 20:32
Whenever I move a page, all my internal links off the form [ [ This Is A Link ] ] get changed to [ [ this_is_a_link ] ]. Is this intentional? Thanks. — Martin Goldman 2008/02/22 20:11
It's not supposed to do that. It may be that other changes within the DokuWiki codebase have changed the behaviour. I will investigate this as soon as I can.
First of all, thank you very much for your great and really useful plugin.
I know your development time is severely limited at the moment and that this feature is in your to do list, but I would like very much your plugin to have this feature.
My wiki has hundreds of pages and grows every day. When I have to move or rename a whole namespace, I'm always very happy that your plugin exists and keeps my links safe but I also always dream it could move or rename a whole namespace in one click.
Do you think you wil be able to do that one day or another ? I am aware that it would probably take you a lot of time.
With the tag-plugin, you can tag pages with other pages
{{tag>:tag:mytag}}
and you can generate a list of pages that use that tag, by using:
{{topic>:tag:mytag}}
When moving a tagged page with the pagemove-plugin, that page won't be listet in this list any more.
Parse error: syntax error, unexpected ')' in /var/www/dokuwiki/lib/plugins/pagemove/admin.php on line 195
in admin.php at line 195:
$this->_pm_updatemedialinks($this->text, $lnk, ':'.$lid ));
cheers,
Alan (2007-07-22)
Fixed: Thanks for the heads up. Thats what I get for doing minor changes from a different computer.
Currently, when I move a page or a namespace, the corresponding ACLs are not moved or renamed (which might break security!). Is there any chance that it will be added soon? If I would develop a patch, is it likely to be incorporated into the official version soon? — Pascal Bihler 2007/05/14 10:39
So for those who care about security, here is the fix:
admin.php in your /tpl/plugins/pagemove-folder with the one inside this archive./tpl/plugins/pagemove/admin.php:
After @unlink(wikiFN($ID)); (around line 207):
//Move the corresponding page ACLs: $this->_pm_moveacl($ID,$opts['new_id']);
Before the last line which reads }:
/** * Move ACls * * This function moves ACLs from an old scope to a new scope * * @author Pascal Bihler <bihler@iai.uni-bonn.de> * */ function _pm_moveacl($old_scope,$new_scope) { global $AUTH_ACL; $matches = preg_grep('/^'.$old_scope.'\s+.*/',$AUTH_ACL); if(count($matches)){ foreach($matches as $match){ $match = preg_replace('/#.*$/','',$match); //ignore comments $acl = preg_split('/\s+/',$match); if ($acl[0] == $old_scope) { //0 is pagename, 1 is user, 2 is acl $this->admin_acl_add($new_scope,$acl[1],$acl[2]); $this->admin_acl_del($old_scope,$acl[1]); } } } } /** * adds new acl-entry to conf/acl.auth.php * Taken from plugin:acl * * @author Frank Schubert <frank@schokilade.de> */ function admin_acl_add($acl_scope, $acl_user, $acl_level){ $acl_config = join("",file(DOKU_CONF.'acl.auth.php')); // max level for pagenames is edit if(strpos($acl_scope,'*') === false) { if($acl_level > AUTH_EDIT) $acl_level = AUTH_EDIT; } $new_acl = "$acl_scope\t$acl_user\t$acl_level\n"; $new_config = $acl_config.$new_acl; return io_saveFile(DOKU_CONF.'acl.auth.php', $new_config); } /** * remove acl-entry from conf/acl.auth.php * Taken from plugin:acl * * @author Frank Schubert <frank@schokilade.de> */ function admin_acl_del($acl_scope, $acl_user){ $acl_config = file(DOKU_CONF.'acl.auth.php'); $acl_pattern = '^'.preg_quote($acl_scope,'/').'\s+'.$acl_user.'\s+[0-8].*$'; // save all non!-matching #FIXME invert is available from 4.2.0 only! $new_config = preg_grep("/$acl_pattern/", $acl_config, PREG_GREP_INVERT); return io_saveFile(DOKU_CONF.'acl.auth.php', join('',$new_config)); }
Hi. Your great plugin works find. But i didn´t find a way to move pages from one namespace to the root. I tried 'root:' - it creates 'root' (sure it does). I tried ':' - didn´t work. What do i have to do? Thanks.
If you click the arrow on the right of the existing namespace combo box and scroll up to the top of the list there is an extry for the root namespace as shown on the image below. Highlight this entry and click submit.
Thanx. It works as soon as you do it right...
It's maybe because the link http://www.isection.co.uk/lib/exe/fetch.php?id=start&cache=cache&media=pagemove.zip leads to old version (0.9.10). Hope that's not bug in my cache or something. But better check it. Thanks.
Sorry about that. I've updated everything to point to the latest versions now.
When page is renamed it would be nice to have "Page name changed from .. to .." and when it's moved then "Page moved from .. to ..". Yeah, when it's moved and renamed, it will be ok to have only one entry of course. But I'm missing the location where pages was moved and also when only renaming the log entry is confusing. I'd really like that.
Thank you very much, I am happy user of your plugin
I'll get on to it next week.
I have tried your pagemove plugin on my dokiwiki, which I am running at home on an Apache server under WinXP (I always try things at home first before uploading them to the main server which runs under Linux).
However when I tried the plugin and moved a page somewhere else, all the new pages had much more line breaks then before, I think that each line break was copied 3 times resulting in a breakdown of the look of the pages. This happened to all the pages, not only the moved ones.
After this I didn't try the plugin on the main Linux server because I didn't want to go hand fixing all those pages and deleting the line breaks.
I guess that the bug could have something with the difference between Linux and Win line breaks, since I expect that most of the testing is done under Linux and you would have surely noticed such behaviour.
Thanks for all the great work you're doing for the thousands of people out there.
Actually I do all my development using Apache on Windows XP. I'll have a look as soon as I can. It looks like that when the event system was added to DokuWiki it changed the default behaviour of the rawWiki function so that the cleanText function which handles the line ending conversion is not called.
Try this version (20070212) which has been changed to call the cleanText function.
I am using tag plugin on my pages which has a plugin typical syntax {{tag>keyword}}. Problem is that then I move the page, the plugin entry is altered to {{new:namespace:location>keyword}} - and that break the function of the plugin. I think this will affect other plugins too. I't needs to be fixed.
The problem is coming from the tag plugin using similar markup to media files. In order to solve this I think I will need to add a configuration option with a list of tags to ignore. I'll have a look as soon as I can.
As a quick fix I have changed the media file regex to exclude any {{ }} tags that enclose a greater-than ">". I will investigate a more rigorous solution when time permits.
I think I am missing something. When I click on "Page Move/Rename... (This topic does not exist yet)" I see this page. I can't figure out how to move pages.
I'm probably doing something brain dead. Thanks for your patience.
Your image shows that you were trying to move the start page, which for system integrity is not allowed. If the start page exists the message should read "Page Move/Rename... (The Start page cannot be moved or renamed)" instead of "Page Move/Rename... (This topic does not exist yet)". This is the behaviour I see when I tried to move the start page on this site. If the start page does not exist then you get the message you are seeing. After all, you can't move something that doesn't exist.
What versions of DokuWiki and the plugin are you using?
I was not trying to move the start page. I don't know how to move any page, that's what I am wondering how to doWhen I click on the option in admin it leads me to this page. How can I check on what versions numbers I have installed? The admin page does not list the version numbers and I can't see the dokuwiki version listed, My downloads directory has dokuwiki-2006-03-09.tgz, so it must be that.Is there a better way, perhaps via email to get help? Thanks for your trouble I know this is freeware.
I second that. All kinds of details and history and whatever are explained, except the most basic question: How to USE this plugin.Is there supposed to be a [Move Page] button that I'm missing? I installed it and I see nothing new, nothing different anywhere.danw
EDIT: So, I figured it out. I still don't like it when instructions skip steps. Can I write your plugin's usage blurb?I was sure you wouldn't mind... Here we go:
After the plugin is installed, you can safely try it this way:
[[foo:dummy1]]
[[bar:dummy2]]
Cheers! danw.
EDIT2: Very nice plugin! I've rearranged my wiki upside-down and inside out already (all pages were in the root namespace; now I have a whole hierarchy), and no bugs whatsoever to report. Just a small suggestion: perhaps the plugin could assume a colon at the end of a newly typed namespace, if missing. Thanks!, and sorry for my grumpiness. Here's my wiki, if you care to look at it: http://deeplayer.com/doku/doku.php/start
Thanks for all your effort danw. I guess I'm too close to the code and hadn't appreciated the problem. I'll try and make some time this week to move your howto onto the front page and expand it further. I've had a quick look at your site and will make time for a closer look. One of the reasons I've been away from the PageMove plugin is that I'm researching implementation of a 3D engine. Due to family commitments at home, I only have 4 or 5 hours a week during my lunch break to do any programming.
O.T. Heh heh heh ... Well, how about we join forces, then? Check our aims: http://deeplayer.com/ (our homepage just went up an hour ago, check out the forum, too)
I tried to use the plugin manager, but it fails to install the module.
Also, wget fails to download the module. Mozilla is able to download the module.
# wget -c http://www.isection.co.uk/lib/exe/fetch.php?id=start&cache=cache&media=pagemove.zip
[1] 16140
[2] 16141
[root@dalamar plugins]# --12:53:23-- http://www.isection.co.uk/lib/exe/fetch.php?id=start
=> `fetch.php?id=start'
Resolving www.isection.co.uk... 213.171.218.210
Connecting to www.isection.co.uk|213.171.218.210|:80... connected.
HTTP request sent, awaiting response... 400 Bad Request
12:53:23 ERROR 400: Bad Request.
I assume you are running on Linux/Unix. The problem with wget is that it is seeing the ampersand (&) as an instruction to run the command in the background.
Try changing the command line to:
wget -O pagemove.zip -c http://www.isection.co.uk/lib/exe/fetch.php?media=pagemove.zip
If you don't add the -O pagemove.zip option you will end up with a file called fetch.php?media=pagemove.zip
I'm not in a position to test the plugin manager problem at the moment.
In my template I have a "sidebar" file. Any idea what it would take to simultaneously move the "sidebar" page as well? All my "sidebar" pages are inside a unique namespace "sidebar" but otherwise are named the same. ...martin 2006/11/5
I'm sorry to say that I don't know. My development time is severely limited at the moment (about 3 hours a week) and there are other projects with higher priority. Also, I haven't any experience of the sidebar templates.
I translated your plugin to Hebrew for use in the Israeli PHP users group Wiki. Couldn't find any place to post the translations - so Hebrew language files can be downloaded from here: http://php-israel.org/source/pagemove_he.tar.gz
Translations can be added by creating a namespace and copying and editing the files in the language section. Thanks for the files. I will add them to the language page.
When I open the plugin, I receive the following:
Warning: Cannot modify header information - headers already sent by (output started at z:\home\test1.ru\www\dokuwiki\lib\plugins\pagemove\admin.php:1) in z:\home\test1.ru\www\dokuwiki\inc\actions.php on line 102
Still the plugin is functional. I use dokuwiki v.2006-03-09 — S'Adm*n 2006/03/11 13:53
Did you checked the permissions and owner of the pagemove-plugin-directory (z:\home\test1.ru\www\dokuwiki\lib\plugins\pagemove)? — touby 2006/04/04 13:14This may be the same problem as that experienced by touby with internal links (See his report below). If your page does have internal links then the problem should now be fixed.
When you move a page in a namespace which is not existing yet, namespace is created but the page isn't moved but copied ! (page is existing yet in its old namespace) And the revisions are not moved. It's the same when you both move and rename the page in a new namespace...
Should be fixed now.
Not really a bug, but to make it work with the new development release the .meta files should probably be moved too. If I understand it correctly, it just means adding |meta in this code snippet.
//Move the Subscriptions & Indexes
$this->_pm_movemeta('metadir', '/^'.$opts['name'].'\.(mlist|indexed|meta)?$/', $opts);
In addition to make it a little easier to use, I'd collapse all the target namespace choices into three options (radiobuttons):
...martin
I've implemented your suggestions into the latest release.
Why don't you make a "Submit" button translationable? — S'Adm*n 2006/03/11 13:53
I missed that one during conversion. It's fixed now if you want to update the language file.
A day i used the pagemove-plugin i got this output and the file has been removed (thanks to the dokuwiki-versioning...)
Warning: Unknown modifier 'B' in /path/to/dokuwiki/lib/plugins/pagemove/admin.php on line 384 Warning: Cannot modify header information - headers already sent by (output started at /path/to/dokuwiki/lib/plugins/pagemove/admin.php:384) in /path/to/dokuwiki/inc/actions.php on line 102
Then i found out that it was because in the target-file was an internal-link to a chapter! Finaly i could reproduce the error...
Has someone else this problem or am i the only one???
Thanks and greez — touby 2006/04/04 13:17
OK it should be fixed now
Hi,
I'm not sure if this is the case of the CamelCase limitation, but when I experimented, the link
[[Name of some link]]
did not get renamed. However, the
[[name_of_some_link]]
was renamde OK.
Regards,Marko.
Thanks for the feedback.
It should now handle links with spaces and special characters correctly.
I think a delete-button would be very nice... What do you think about? — touby 2006/04/04 13:31
I had considered it but thought it would be better as a dedicated plugin. You would need to consider the following issues.
- What would happen to the old links - would they be converted to plain text or left in place in which case someone could create the page again?
- What safety controls would be needed?
Mhh, you're right but i thought about it because it is a related topic - so it would be nice in the same plugin...
- A possibility is to select what should happen to the old links e.g. in a config-file or with radio-buttons...
- I think a ACL-check and an additional confirm-question would be enought safety (perhaps also a selection if you will remove the history too or even not) Greez — touby 2006/04/05 09:47At the moment admin plugins are only visible to superusers who have full access to the entire wiki anyway, so an ACL check would always be positive. I don't think there are any plans to change this in the near future.
Putting this functionality in a separate plugin would allow the overall sys admin to control whether to have move/rename only or move/rename and delete.
If anyone else would like a delete plugin, leave a note here. The more requests I get the higher priority I'll give it.
I would most humbly request that you add support for CamelCase. CamelCase is a big part of my wiki world-view!
This is what I see in trying to rename a page:
Fatal error: Call to undefined function io_rename() in /usr/share/dokuwiki/lib/plugins/pagemove/admin.php on line 517
Any thoughts? Thanks!
I follow the steps above to testing moving dummy1 and I get : Warning: Invalid argument supplied for foreach() in /var/www/html/dokuwiki/inc/parserutils.php on line 318 Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/dokuwiki/inc/parserutils.php:318) in /var/www/html/dokuwiki/inc/actions.php on line 128 Writing /var/www/html/dokuwiki/data/pages/mywiki/dummy1.txt failed
Any ideas what is wrong? As far as i know I have dokuwiki-2006-11-06 installed, but not sure how to check the version number.
you can check your dokuwiki version number using (for instance) http://www.isection.co.uk/doku.php?do=check
I had a search at splitbrain.org and found this link which matched your problem.
http://wiki.splitbrain.org/doku.php?id=wiki:discussion:help#problem_with_creating_new_page_under_wiki_namespace
Check the permissions of the directory /var/www/html/dokuwiki/data/pages/mywiki
Thank you
"chmod -R 777 dokuwiki/data" did the trick