deki-2009.10 "Save as PDF" doesn't work

Bug #484578 reported by John Remenyi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TurnKey Linux
Fix Released
Medium
Alon Swartz
2009.10-2-hardy-x86
New
Undecided
Unassigned

Bug Description

Installed turnkey-deki-2009.10-hardy-x86.iso into virtualbox, created a few random pages and tried to print and "Save as PDF". Didn't work. Decided to then try installing prince (which provides this functionality I am assuming) but noticed is already there in manifest (prince 6.0r8-1). So... am stuck as to what to try next, or what config file where need be edited to get it going, if in fact the community edition of deki does allow pdf saving.

John.

Revision history for this message
John Remenyi (jrem) wrote :

also just noticed any files or images uploaded aren't available. The uploaded files/images do show up in /var/www/dekiwiki/attachments however, so they do get there, just the web page gives a 404 when you try to access it.

Alon Swartz (alonswartz)
Changed in turnkeylinux:
status: New → Confirmed
assignee: nobody → Alon Swartz (alonswartz)
importance: Undecided → Medium
Revision history for this message
Alon Swartz (alonswartz) wrote :

The generated deki generated URLs seem to be missing @api.
Manually navigating to the requested URL while prepending @api works as expected (displaying uploaded file/image, generating pdf).

http://appliance_ip/deki/files/1/=image.png -> http://appliance_ip/@api/deki/files/1/=image.png
http://appliance_ip/deki/pages/21/pdf -> http://appliance_ip/@api/deki/pages/21/pdf

I am still trying to figure out if this is a bug in dekiwiki, or an appliance mis-configuration.

Revision history for this message
Alon Swartz (alonswartz) wrote :

I sent a message to MindTouch to get their take on the issue, but in the meantime you can use this workaround to rewrite deki/(files|pages) urls to prepend @api.

RewriteCond %{REQUEST_URI} ^/deki/(files|pages)/
RewriteRule ^/(.*)$ /@api/$1 [L,PT]

1. Update /etc/dekiwiki/apache.conf to include the above lines in the http(s) virtual hosts (see below for placement)
2. Reload the Apache configuration (/etc/init.d/apache2 reload)

Patch

     RewriteCond %{REQUEST_URI} !^/error/(.*)\.var$
     RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
     RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
+
+ RewriteCond %{REQUEST_URI} ^/deki/(files|pages)/
+ RewriteRule ^/(.*)$ /@api/$1 [L,PT]
+
 </VirtualHost>

 <VirtualHost *:443>
     RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
     RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]

+ RewriteCond %{REQUEST_URI} ^/deki/(files|pages)/
+ RewriteRule ^/(.*)$ /@api/$1 [L,PT]
+
     # Bug: 5252 https rewrite/proxy rules
     RewriteCond %{HTTPS} =on
     RewriteCond %{REQUEST_URI} ^/@api/

Revision history for this message
John Remenyi (jrem) wrote :

All good now, those workarounds worked.

Revision history for this message
Brian Hill (brian-hillz0r) wrote :

I am an employee with MindTouch. What's causing this is the setting of the 'public-uri' variable in /etc/init.d/dekiwiki on line 120. In most cases, this doesn't need to be set. This setting is for when the API cannot determine what IP address to bind to through normal enumeration processes. However, if you want to keep it set, please change the line to read:

MONO_ARGS="$HOST_EXE apikey $APIKEY script $SCRIPT path-prefix $PATH_PREFIX public-uri http://$IP:$HTTP_PORT/@api http-port $HTTP_PORT ip $IP connect-limit $CONNECT_LIMIT $NOTTY $GUID"

Let me know if you have any questions.

Thanks!

Revision history for this message
Alon Swartz (alonswartz) wrote :

I have commited the patch to the deki build, and it will be included in all releases from now on.
I'll link here from the appliance page for anyone else who comes across this issue.

Thanks Brian!

Alon Swartz (alonswartz)
Changed in turnkeylinux:
status: Confirmed → Fix Committed
Revision history for this message
Alon Swartz (alonswartz) wrote :

Fix included in 2009.10-2 release

Changed in turnkeylinux:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.