splitbrain / dokuwiki-plugin-graphviz

Create Graphviz graphs from within DokuWiki
http://www.dokuwiki.org/plugin:graphviz
12 stars 15 forks source link

All diagrams have disapeared after Rincewind upgrade #4

Open csjean opened 13 years ago

csjean commented 13 years ago

After having done a dokuwiki upgrade (from Anteater to Rincewind) all dokuwiki pictures have disappeared.

I have re-installed the plugin without success. No error message appears and everything seems normal except for the missing picture.

Can you help?

csjean commented 13 years ago

I believe my problem was a cache problem. I have a "workaround" wich may be the solution...

I changed the syntax.php file by adding a clearcach command.

    /**
     * Return path to the rendered image on our local system
     */
    function _imgfile($data){
        if($conf['debug']){
            dbglog($cache, 'image file cache');
        }
        $cache  = $this->_cachename($data,'png');
                // create the file if needed
        /*******************************************************
        ****  CSJ added line ****/
        clearstatcache();
        /*******************************************************/

        if(!file_exists($cache)){
            $in = $this->_cachename($data,'txt');
            if($this->getConf('path')){
                $ok = $this->_run($data,$in,$cache);
            }else{
                $ok = $this->_remote($data,$in,$cache);
            }
            if(!$ok) return false;
            clearstatcache();
        }

        // resized version
        if($data['width']){
            $cache = media_resize_image($cache,'png',$data['width'],$data['height']);
        }

        // something went wrong, we're missing the file
        if(!file_exists($cache)) return false;
        //print $cache;
        return $cache;
    }
poulpoulsen commented 9 years ago

Hello, unfortunately your patch did not work for me. I use dokuwiki "hrun" with latest graphviz plugin. local.php shows the right path to dot. If i run your example, the diagram flashed up for a very short moment and then dissappearde. No errors, no messages.

Any clues?

Regards Poul