Giter Site home page Giter Site logo

plugin-meta's People

Contributors

klap-in avatar lpaulsen93 avatar michitux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin-meta's Issues

Error argument 1 is not an array

An error of "argument 1 is not an array" is displayed when trying to set the description abstract meta data and the meta data is not set.

The problem is explained at http://php.net/manual/en/function.array-merge.php - "The behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. However, you can use typecasting to merge other types.".

The solution is to change line 91 in syntax.php from
array_merge($renderer->meta[$key], $value);
To
array_merge((array)$renderer->meta[$key], $value);

Hogfather incompatibility

PHP Fatal error: Uncaught Error: Call to protected method Doku_Renderer_metadata::_firstimage() from context 'syntax_plugin_meta' in /var/www/html/dokuwiki/lib/plugins/meta/syntax.php:75

Points to: $renderer->_firstimage($subvalue);

PHP v7.3.14-1~deb10u1

I can comment out this line as I do not change relation firstimage anyway, and everything seems to work.

Fails to set 'date created'

Latest version correctly sets all but the date in the following example:

~~META:
title                 = Example
&creator              = AUTHOR
&date created         = 2014-12-03
&description abstract = This is a test
&source               = http://www.example.org/
~~

Replaced syntax.php with 2015-07-24 version and all works as expected.

syntax.php is deprecated

โ€ฆ/data/log/deprecated/*.log shows entries such as this:
2022-09-06 13:28:11 syntax.php is deprecated. It was called from require_once() in /dokuwiki-test/lib/plugins/syntax.php:3 Do not require() files yourself. Autoloading should be used instead!

A grep over the plugins folder turned up this which I suspect is one of the causes of the message:
/var/www/dokuwiki-test/lib/plugins/meta/syntax.php:require_once(DOKU_PLUGIN.'syntax.php');
See: https://github.com/dokufreaks/plugin-meta/blob/master/syntax.php#L10

Commenting the line seems to solve the issue.

fiwswe

The documentation does not define "subkey" or provide enough examples

I needed to set the value of the "abstract" meta property and reference it from within the DIR plugin, something that seemed workable. I spent almost all day researching Dokuwiki's meta-data structures, experimenting with plugin-meta syntax and single-stepping through the plugin-meta code to finally discover that [1] the "abstract" meta-property is a "subkey" of the "description" meta-property and [2] the plugin-meta syntax for subkeys is untouched by its documentation. I finally discovered the proper syntax and was able to make the META and DIR plugins work together as desired. Whew.

I'm not complaining about the time because it was a geeky challenge and I learned a LOT, but this plugin's documentation should be more complete because not everybody has the time, developer background or software tools required to do what I did. I created my own account on dokuwiki.org thinking I could update the plugin-meta documentation with what I learned, but getting normal dokuwiki.org credentials doesn't give editing rights. Sigh.

Other points:

  • The code which parses the keys, subkeys and values is a bit brittle. It doesn't recognize and render a syntax error involving a subkey, which provokes a fatal PHP error in the bowels of the Dokuwiki renderer and instantly leaves the site inoperable until you get into the server's backend and remove the offending syntax from the page content. This is an inconvenient way to discover what the proper syntax should be.
  • The so-called description of a page is internally its abstract, and the abstract is a subkey of description in the minds of Dokuwiki and plugin-meta. By default, abstract is preloaded with the first 250 characters of the page content after every edit UNLESS plugin-meta has declared another value (which is what I was trying to do).
  • The proper plugin-meta syntax for this specific value is description abstract = [your-text] (not including the preceding "&" if the line is not the first in the ~~META declaration).

I would be happy to augment the documentation myself if I had a way to do that, obviously in collaboration with the plugin author/maintainer. I envision adding a table of examples to document the full spectrum of all the settable metadata properties (which is a small subset of all the properties which actually exist within Dokuwiki).

I wish I had time, now that I know more about how this plugin works, to offer some help with the code. That's another issue for another day. Sigh.

I like this plugin and I'm very happy it exists. Let me know how I can be involved in at least improving the documentation. Thanks.

hogfather

Could someone update this plugin for its functionality in DokuWiki Hogfather?
Much appreciated in advance

how to actualize meta information after modifying pages from console in blog page ?

Hi, and thanks for this plugin !

I use it for displaying news of the dokuwiki with blog and tag plugins, and they work perfectly after modifying the meta balise from the classical editor of dokuwiki. However, when I change metadata with unix console (with sed), changes not appear in the blog page, when I clean the cache or not. The modification appear if only I open the page out of the blog page.
How can I actualize metainformation after changing pages from console ? It's usefull for maintenance.

Best regards,
Thibaud.

Space after META: is interpreted as subkey

Hi! It's not workable, I add
~~META:
title = My text
~~
And nothing happens- this code displays on page. Please fix problems! I can't find analogue of this plugin for setting up title on my pages!
P.S. Dokuwiki 2012-01-25 "Angua"

Issue setting up a META

What I'm trying to achieve is to set up (a bunch of) pages with some tags, and then have another page listing all the pages containing one tag.

For that, I'm using the plugins TAG ([https://www.dokuwiki.org/plugin:tag]), PAGELIST ([https://www.dokuwiki.org/plugin:pagelist]) and META ([https://www.dokuwiki.org/plugin:meta]).

The plugin META is used in the hope to get exactly what I want (not the 200 or something first characters of a given page) in the list.
So I did put this META : ~~META:description abstract=blablabla - exactly what I want to be displayed in the Description field of the list - blablabla.~~
But the list still doesn't show my "description" field in the list.

I did play around that a bit for the last 2 days and found a workaround consisting of using another plugin : METAEDITOR ([https://www.dokuwiki.org/plugin:metaeditor]). The trick is to create a persistent key : description -> abstract (and leave it empty)
Then, The description field is shown as expected.

So the good thing is : that works as a workaround \o/
An the less-good thing is : that works as a workaround ... meaning that I would need to create this empty key for every page (hundreds of them) :/

Any help would be much more appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.