You are here:  » Warning: preg_match(): Empty regular expression in /includes/widget.php on line 342


Warning: preg_match(): Empty regular expression in /includes/widget.php on line 342

Submitted by mbrooks6 on Thu, 2015-12-03 08:19 in

Hi David,

This is a first time posting and user of your forum. Having purchased the script quite some time ago, over the last few months I have finally found the time to start to get to grips with the script and the potential it has. Having got one web site up and running successfully using script version 15/09A Beta, yesterday I downloaded the current version 15/09A final.

Instillation of the script went well along with general configuration. I then attempted to add a feed via the automation tool only to find I was unable to do so with PHP throwing an error, Warning: preg_match(): Empty regular expression in /path/to/script/includes/widget.php on line 342

I wondered if this error has previously been noted and if there might be a fix for the same?

I am running on a dedicated server with full control over all content, PHP configuration, with a Cloudlinux kernel on the maching, along with PHP selector, meaning I have access to all versions of PHP from PHP 4.4 through to PHP7, the same error is apparent in all versions of PHP from PHP 5.1 through to PHP7.

I will look forward to your reply and if access to the server is required, I will only be too happy to grant this to you.

Mark

Submitted by support on Thu, 2015-12-03 09:03

Hello Mark,

Thank you for your comments and welcome to the forum!

It sounds like you may still be using config.advanced.php from the beta distribution. A couple of new parameters including format validation of the feed filename were added in the final version so that should be all it is - grab config.advanced.php from the latest distribution and upload over the to of the existing version and that should be all it is...

Cheers,
David.
--
PriceTapestry.com

Submitted by mbrooks6 on Thu, 2015-12-03 09:25

Many thanks for the speedy reply David.

I will give this a go and let you know.

Submitted by mbrooks6 on Wed, 2015-12-16 09:13

That worked, silly me, I checked just about every other file too just not the config files for any changes.

Submitted by shaunmac on Wed, 2016-12-07 22:59

I'm getting a similar error message when I go to register a new feed. The error is below, I have uploaded a new config.advanced.php file with no luck.

Warning: preg_match(): Empty regular expression in {code saved}/admin/feeds_register_step1.php on line 14
Invalid filename

Submitted by support on Thu, 2016-12-08 10:34

Hi Shaun,

That's the feed filename validation regexp - check you have the following in config.advanced.php

  $config_filenameRegExp = "/^([0-9A-Za-z_\-\.]+)(\.xml|\.csv)$/";

(line 94 in 15/09A distribution)

Cheers,
David.
--
PriceTapestry.com