Page 1 of 1

Browse by Subjects issue

PostPosted: Wed Oct 31, 2012 8:56 am
by kdriscol
I manage the server that Archon resides on for our Archives group on campus and occasionally they ask for assistance with the Archon application. We are running Archon version 3.21 rev-1 and we are seeing an issue with the "Browse by Subjects". A number of the items under this grouping present code when rendering the page and a link for an example is listed below:

http://archon.kennesaw.edu/index.php?p= ... ts&id=1383

Example of what is presented on the page:
Browse by Subject | Kennesaw State University Archives

Sub-Terms Under Acworth (Ga.):

(Related Records)?>" . $objSubject->toString(LINK_TOTAL, true) . "
\n"); ?>

Not all of the Browse by Subject links have this behavior. Is there a fix for this issue?

Re: Browse by Subjects issue

PostPosted: Sat Dec 08, 2012 11:33 am
by FitoPlancton
Hello kdriscol,

You fixed the bug? We are having exactly the same problem here. Runnig Archon 3.21 rev-1

Anyone else?
Regards,

Re: Browse by Subjects issue

PostPosted: Sat Dec 08, 2012 1:33 pm
by FitoPlancton
Hey,

'Solved' my problem using the version 3.21 of Subjects package, instead 3.21 rev-1...
it seems ok.

Regards,

Re: Browse by Subjects issue

PostPosted: Thu Jun 13, 2013 9:27 am
by gjerdery
In our system, also 3.21 r-1, the issue manifests itself only for subjects that have child subjects. Parent nodes show the code noted above, while child nodes are just fine. I'll see if I can take a look a what causes this.

Re: Browse by Subjects issue

PostPosted: Thu Jun 13, 2013 11:55 am
by gjerdery
I've found a fix for this issue in the 3.21 r-1 code. The code in the subjectlist template was being inserted into the html page, rather than being evaluated. I'll submit a pull request to Github, but for those just wanting to change their local system, here is the fix.

In packages/subjects/pub/subjects.php, change the contents of the foreach loop beginning on line 211 from

$content .= $_ARCHON->PublicInterface->Templates[$_ARCHON->Package->APRCode]['SubjectList'];

to:

ob_start();
eval($_ARCHON->PublicInterface->Templates[$_ARCHON->Package->APRCode]['SubjectList']);
$content .= ob_get_contents();
ob_end_clean();