Error with search when publishing

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

Error with search when publishing

Postby Samson » Sat May 07, 2011 4:47 am

The code of my page:
Code: Select all
<?php /* pivot */ die(); ?>a:23:{s:4:"user";s:6:"samson";s:9:"sortorder";i:10;s:4:"link";s:4:"/?p=";s:8:"link_end";s:0:"";s:4:"code";i:34;s:4:"date";s:16:"2011-05-05-20-06";s:3:"uri";s:47:"berliner-einzelmeisterschaft-2011-meisterklasse";s:7:"chapter";i:10;s:12:"publish_date";s:16:"2011-05-05-20-06";s:5:"title";s:49:"Berliner Einzelmeisterschaft 2011 - Meisterklasse";s:8:"subtitle";s:0:"";s:8:"template";s:1:"-";s:12:"introduction";s:259:"<p>[[tablemaker]]<br />{| border="1" cellpadding="20" cellspacing="0"<br />|+align="bottom" style="color:#e76700;"|''Essenssachen''<br />|-<br />|Orange<br />|Apfel<br />|-<br />|Brot<br />|Torte<br />|-<br />|Butter<br />|Eis<br />|}<br />[[/tablemaker]]</p>";s:4:"body";s:0:"";s:10:"convert_lb";i:5;s:6:"status";s:7:"publish";s:14:"allow_comments";i:0;s:8:"keywords";s:0:"";s:11:"extrafields";a:4:{s:5:"image";s:0:"";s:17:"image_description";s:0:"";s:16:"galleryimagelist";s:0:"";s:8:"password";s:0:"";}s:3:"uid";i:34;s:9:"edit_date";s:16:"2011-05-07-06-15";s:11:"chaptername";s:4:"2011";s:11:"chapterdesc";s:39:"Seiten mit Veranstaltungen im Jahr 2011";}

This code in editor:
Code: Select all
[[tablemaker]]
{| border="1" cellpadding="20" cellspacing="0"
|+align="bottom" style="color:#e76700;"|''Essenssachen''
|-
|Orange
|Apfel
|-
|Brot
|Torte
|-
|Butter
|Eis
|}
[[/tablemaker]]

When I publish this page (button "Post Page") comes with error in browser:
Code: Select all
Error opening file
The file G:/Testserver/pivotx/db/search/|.php could not be opened for writing!

A problem with pipe-symbol with the indexing. Solutions or patchs?
Regards
Frank
My blog (with PivotX) - and my actual projects: German Chess Union, Berlin Chess Union (with phpCMS, all in german)
Samson
 
Posts: 38
Joined: Sun Apr 10, 2011 1:18 pm
Location: Berlin, Germany

Re: Error with search when publishing

Postby hansfn » Mon May 09, 2011 8:47 am

I develop (and test) my code on Unix/Linux systems which allow some characters in filenames that Windows doesn't. I have made a fix that will be part of PivotX 2.2.6. You can apply the fix yourself. In modules/module_search.php, find the function searchIndexKey (line 43) - just replace the lines

Code: Select all
    /*
    $regex = "[^a-zA-Z0-9]";
    $char = preg_replace('/'.preg_quote($regex).'/', "", $char);
    */

with

Code: Select all
    // Make sure we don't allow characters that are illegal in filenames.
    // Replacing non-alphanumeric characters with "z". Hackish ...
    $char = preg_replace('/[^a-zA-Z0-9]/', 'z', $char);
hansfn
Developer
 
Posts: 3282
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: Error with search when publishing

Postby Samson » Mon May 09, 2011 6:41 pm

Thank you!
Regards
Frank
My blog (with PivotX) - and my actual projects: German Chess Union, Berlin Chess Union (with phpCMS, all in german)
Samson
 
Posts: 38
Joined: Sun Apr 10, 2011 1:18 pm
Location: Berlin, Germany


Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 1 guest

cron