Re: [xwiki-users] attachmentsinline.vm loses context: $doc “undefined”
Just because I have been looking at something related in the code: Hello xWikiers, I’ve just registered to the mailing list and I’m pleased to introduce you the site http://apice.unibo.it, developed by the APICe Research Group, which belong to The Department of Information Engineering and Computer Science (DISI) of University of bologna, Italy. The site is up since 2007, starting from xwiki 1.1. Since then it has been migrated step by step and is now powered by xwiki 2.1.2. It’s my aim to migrate to latest version, but I’m stuck in the middle of the process, because of a problem during migration to 2.2.6 with the rendering of the comments, attachments, history and Information Here's what happens: http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/bug226.jpg As can be seen, I use a cloned test site to simulate every upgrade task; I’ve injected some debug code in the docextra.vm template (as in attachmentsinline.vm) To solve the bug, I’m focusing on docextra.vm template: the $doc and the $tdoc variables are “undefined” when the *inline.vm template are called inside the javascrit, with document.observe or Event.observe that run XWiki.displayDocExtra(${extraAnchor}, ${extraTemplate}, false); for instance ${extraAnchor} = “attachments”, ${extraTemplate} = “attachmentsinline.vm” There must be some problem that the HTML-page does not contain the proper information about which XWiki-page it is rendering In the head of the HTML-page you should find something like: window.docgeturl = /xwiki/bin/get/Publications/undefined; If present, that would be the source of the problem. The correct version should look like: window.docgeturl = /xwiki/bin/get/Publications/BioSac2012; However, same as Vincent suggests, I recommend not not debug this problem ... while I cannot find a bug report related to this, I guess this is an issue specific to 2.2.6 and certainly has been fixed soon later on. (It is definitely not there in the current versions, people would have noticed ;) Cheers, Clemens From the log it’s clear that this is the problem ($tdoc variable is “undefined”) because I find in the log: https://test.apice.unibo.it/xwiki/bin/view/Publications/undefined?xpage=xpartvm=attachmentsinline.vm instead the correct url should be, for example: https://test.apice.unibo.it/xwiki/bin/view/Publications/BioSac2012?xpage=xpartvm=attachmentsinline.vm that actually works! I do not can understand why The $doc and the $tdoc variable is “undefined” at runtime… Any suggestion? Thank you very much Nazzareno Pompei PS: I’m experiencing a problem with import page too, is it entangled? http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/importBug.png + Ing. Nazzareno Pompei DISI - Dipartimento di Informatica: Scienze ed Ingegneria e-mail :nazzareno.pom...@unibo.it Tel. : +39 0547339205 Fax. : +39 0547339208 Il presente messaggio ed i suoi allegati devono intendersi di tipo confidenziale ad uso esclusivo dei suoi destinatari. Il mittente declina ogni responsabilità in caso di intercettazione o modifica. In caso di ricezione per errore del messaggio, si prega di cancellarlo, di distruggerne ogni copia e di darne opportuno avviso al mittente. + ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users mit freundlichen Grüßen Clemens Klein-Robbenhaar -- Clemens Klein-Robbenhaar Software Development EsPresto AG Breite Str. 30-31 10178 Berlin/Germany Tel: +49.(0)30.90 226.763 Fax: +49.(0)30.90 226.760 robbenh...@espresto.com HRB 77554 B - Berlin-Charlottenburg Vorstand: Maya Biersack, Peter Biersack Vorsitzender des Aufsichtsrats: Dipl.-Wirtsch.-Ing. Winfried Weber Zertifiziert nach ISO 9001:2008 ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] attachmentsinline.vm loses context: $doc “undefined” [SOLVED]
THANK YOU ALL, I had a lucky strike with the attachments problem, I repeated several times the migration process, but This time I have left xwiki.cfg, with the complete DEFAULT value, (in the previous attempts I uncommented few lines... It shouldn't had affected anything) Now It remains only the problem with the import page: the content of the XAR package is not listed, thus it's impossible to import anything. http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/importBug.png I'm starting to work on it. I'm planning to migrate to 6.2.5 as suggested, but my site is huge (13GB of which 12GB of PDF attachment) and very complex (we developed plugins, for SSO authentication for example...) Therefore I think I need first to get to version 3, to dump attachments to file system I'm going to work on a strategy and I'll submit it as soon as I finish the plan best regards Nazzareno Pompei Il giorno 03/feb/15, alle ore 09:57, Clemens Klein-Robbenhaar ha scritto: Just because I have been looking at something related in the code: Hello xWikiers, I’ve just registered to the mailing list and I’m pleased to introduce you the site http://apice.unibo.it, developed by the APICe Research Group, which belong to The Department of Information Engineering and Computer Science (DISI) of University of bologna, Italy. The site is up since 2007, starting from xwiki 1.1. Since then it has been migrated step by step and is now powered by xwiki 2.1.2. It’s my aim to migrate to latest version, but I’m stuck in the middle of the process, because of a problem during migration to 2.2.6 with the rendering of the comments, attachments, history and Information Here's what happens: http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/bug226.jpg As can be seen, I use a cloned test site to simulate every upgrade task; I’ve injected some debug code in the docextra.vm template (as in attachmentsinline.vm) To solve the bug, I’m focusing on docextra.vm template: the $doc and the $tdoc variables are “undefined” when the *inline.vm template are called inside the javascrit, with document.observe or Event.observe that run XWiki.displayDocExtra(${extraAnchor}, ${extraTemplate}, false); for instance ${extraAnchor} = “attachments”, ${extraTemplate} = “attachmentsinline.vm” There must be some problem that the HTML-page does not contain the proper information about which XWiki-page it is rendering In the head of the HTML-page you should find something like: window.docgeturl = /xwiki/bin/get/Publications/undefined; If present, that would be the source of the problem. The correct version should look like: window.docgeturl = /xwiki/bin/get/Publications/BioSac2012; However, same as Vincent suggests, I recommend not not debug this problem ... while I cannot find a bug report related to this, I guess this is an issue specific to 2.2.6 and certainly has been fixed soon later on. (It is definitely not there in the current versions, people would have noticed ;) Cheers, Clemens From the log it’s clear that this is the problem ($tdoc variable is “undefined”) because I find in the log: https://test.apice.unibo.it/xwiki/bin/view/Publications/undefined?xpage=xpartvm=attachmentsinline.vm instead the correct url should be, for example: https://test.apice.unibo.it/xwiki/bin/view/Publications/BioSac2012?xpage=xpartvm=attachmentsinline.vm that actually works! I do not can understand why The $doc and the $tdoc variable is “undefined” at runtime… Any suggestion? Thank you very much Nazzareno Pompei PS: I’m experiencing a problem with import page too, is it entangled? http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/ importBug.png + Ing. Nazzareno Pompei DISI - Dipartimento di Informatica: Scienze ed Ingegneria e-mail :nazzareno.pom...@unibo.it Tel. : +39 0547339205 Fax. : +39 0547339208 Il presente messaggio ed i suoi allegati devono intendersi di tipo confidenziale ad uso esclusivo dei suoi destinatari. Il mittente declina ogni responsabilità in caso di intercettazione o modifica. In caso di ricezione per errore del messaggio, si prega di cancellarlo, di distruggerne ogni copia e di darne opportuno avviso al mittente. + ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users mit freundlichen Grüßen Clemens Klein-Robbenhaar -- Clemens Klein-Robbenhaar Software Development EsPresto AG Breite Str. 30-31 10178 Berlin/Germany Tel: +49.(0)30.90 226.763 Fax: +49.(0)30.90 226.760 robbenh...@espresto.com HRB 77554 B - Berlin-Charlottenburg Vorstand: Maya Biersack, Peter Biersack Vorsitzender des Aufsichtsrats: Dipl.-Wirtsch.-Ing. Winfried Weber Zertifiziert nach ISO 9001:2008
Re: [xwiki-users] attachmentsinline.vm loses context: $doc “undefined”
Hi Nazzareno, On 30 Jan 2015 at 13:37:11, Nazzareno Pompei (nazzareno.pom...@unibo.it(mailto:nazzareno.pom...@unibo.it)) wrote: Hello xWikiers, I’ve just registered to the mailing list and I’m pleased to introduce you the site http://apice.unibo.it, developed by the APICe Research Group, which belong to The Department of Information Engineering and Computer Science (DISI) of University of bologna, Italy. The site is up since 2007, starting from xwiki 1.1. It’s very nice to see some long time users of XWiki! :) I’m sure you’ll see a lot of improvements with recent versions ;) Since you’re using a very old version (2.1.2), I’d propose to use the strategy defined here and to install XWiki 6.2.5 (6.4.1 to be released in about a week or so): http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Upgrade#HAlternative:ExportandReimport Normally we’ve kept all the scripting API backward compatible and your wiki pages should import fine. Is that how you’ve “upgraded” or are you doing the WAR upgrade strategy defined here: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Upgrade#HUpgradingthewebapp Thanks -Vincent Since then it has been migrated step by step and is now powered by xwiki 2.1.2. It’s my aim to migrate to latest version, but I’m stuck in the middle of the process, because of a problem during migration to 2.2.6 with the rendering of the comments, attachments, history and Information Here's what happens: http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/bug226.jpg As can be seen, I use a cloned test site to simulate every upgrade task; I’ve injected some debug code in the docextra.vm template (as in attachmentsinline.vm) To solve the bug, I’m focusing on docextra.vm template: the $doc and the $tdoc variables are “undefined” when the *inline.vm template are called inside the javascrit, with document.observe or Event.observe that run XWiki.displayDocExtra(${extraAnchor}, ${extraTemplate}, false); for instance ${extraAnchor} = “attachments”, ${extraTemplate} = “attachmentsinline.vm” From the log it’s clear that this is the problem ($tdoc variable is “undefined”) because I find in the log: https://test.apice.unibo.it/xwiki/bin/view/Publications/undefined?xpage=xpartvm=attachmentsinline.vm instead the correct url should be, for example: https://test.apice.unibo.it/xwiki/bin/view/Publications/BioSac2012?xpage=xpartvm=attachmentsinline.vm that actually works! I do not can understand why The $doc and the $tdoc variable is “undefined” at runtime… Any suggestion? Thank you very much Nazzareno Pompei PS: I’m experiencing a problem with import page too, is it entangled? http://apice.unibo.it/xwiki/bin/download/Sandbox/WebHome/importBug.png ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users