Loading...
 
Skip to main content

Inline attachments show "No such attachment on this page" on print view.

Status
Closed
Subject
Inline attachments show "No such attachment on this page" on print view.
Version
3.x
Category
  • Consistency
  • Usability
Feature
Wiki Plugin (extends basic syntax)
Resolution status
Fixed or Solved
Submitted by
fborcel
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

When showing a page in print view (tiki-print.php), attachments do not show. Instead, a message called "No such attachment on this page" appears.

NOTE: I was able to fix this for tiki-print.php, but not for tiki-print_multiple_pages.php

Solution

Around line 251, change

if( strstr( $_SERVER['SCRIPT_NAME'], 'tiki-index.php' ) || strstr( $_SERVER['SCRIPT_NAME'], "tiki-editpage.php" ) || strstr( $_SERVER['SCRIPT_NAME'], 'tiki-pagehistory.php') ) {


for

if( strstr( $_SERVER['SCRIPT_NAME'], 'tiki-index.php' ) || strstr( $_SERVER['SCRIPT_NAME'], "tiki-editpage.php" ) || strstr( $_SERVER['SCRIPT_NAME'], 'tiki-pagehistory.php') || strstr( $_SERVER['SCRIPT_NAME'], 'tiki-print.php' ) ) {


Thus the code section should end up as:

wikiplugin_attach.php
Copy to clipboard
// See if we're being called from a wiki page. if( strstr( $_SERVER['SCRIPT_NAME'], 'tiki-index.php' ) || strstr( $_SERVER['SCRIPT_NAME'], "tiki-editpage.php" ) || strstr( $_SERVER['SCRIPT_NAME'], 'tiki-pagehistory.php') || strstr( $_SERVER['SCRIPT_NAME'], 'tiki-print.php' ) ) { $atts_item_name = $_REQUEST["page"]; $atts = $wikilib->list_wiki_attachments($atts_item_name,0,-1,'created_desc',''); }

Workaround
Importance
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
2640
Created
Monday 20 July, 2009 14:46:16 UTC
by Unknown
LastModif
Wednesday 27 May, 2026 07:22:35 UTC


Show PHP error messages