Loading...
 
Skip to main content

Features / Usability


plugin lastmod shows current time

I have the lastmod plugin at the bottom of my pages. It always shows the current date and time as of the last page load. If I refresh the page without changing it, the time changes to the new current time. I thought that this was only supposed to update when I actually edit the page.

(Using version 5.0)

I'm having the same issue.

I was hoping to use this plugin to display version info when printing pages, but I get the same issue as you; the plugin outputs the current time.

I'm using Tiki 8.3.


I checked the lastmod plugin in 6.7 and it calls the page_exists_modtime function in /lib/tikilib.php. For some reason the function is returning a null, which causes the lastmod plugin to display the current date and time.

Thanks for looking into this Tom. I see the same thing in 8.3. Should this be reported as a bug? Sorry if that's a silly question, I'm new to Tiki and don't want to offend.

I don't know much about fixing php code, so for now I'm trying to use pluginSQL as a workaround to pull the same data. Sure would be nice if the LastMod worked though.


The documentation for the Lastmod PluginQuestion says if you don't specify the page name, Lastmod defaults to the current page.

I have now tested:

Copy to clipboard
{LASTMOD()/}

and

Copy to clipboard
{LASTMOD(page=HomePage)/}

in the HomePage of Tiki versions 2 through 9.

In each version of Tiki, the plugin with the pagename specified worked correctly (other than the '%0' in Tiki 2 mentioned in the documentation).

When Lastmod is coded without specifying the page name, the current date and time are returned in Tiki versions 2 through 6, and nothing at all is returned in Tiki versions 7 through 9.

There appears to be a problem with how the Lastmod plugin get the page name when it is not specified.

This is a bug that could be reported. The workaround is to specify the page name.

Thanks again Tom! I really appretiate you sharing your expertise. Hopefully I can return the favor one day.

I was able to get LastMod plugin to work by specifying the page name as you mention in the workaround.

I was hoping to use this plugin in a template for wiki pages, but having to specify the page for every instance will make that a bit of a challange.

When I read through the docsQuestion I didn't pick up on this workaround. I have update the doc and add a bug reportQuestion.