- Posts: 7
COMMUNITY FORUM
Error message K2 media upload in Joomla
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
9 years 2 weeks ago #153930
by Christian van Vorst
Error message K2 media upload in Joomla was created by Christian van Vorst
We recieve error messages when uploading media in the K2 plugin for Joomla.
Error:
PHP Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 2910
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 2950
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 2977
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 3004
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 3022
What to do to solve this?
Thanks for your answer.
Error:
PHP Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 2910
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 2950
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 2977
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 3004
/public/sites/www.jcctuinenparkmachines.nl/administrator/components/com_k2/lib/class.upload.php on line 3022
What to do to solve this?
Thanks for your answer.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 2 weeks ago #153937
by Krikor Boghossian
Replied by Krikor Boghossian on topic Error message K2 media upload in Joomla
Hello,
Which version of K2 and Joomla! are you using?
Which version of K2 and Joomla! are you using?
Please Log in or Create an account to join the conversation.
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 2 weeks ago #153963
by Christian van Vorst
Replied by Christian van Vorst on topic Error message K2 media upload in Joomla
Using Joomla 3.4.8 and K2 2.6.9
We updated both but then the site went ballistic because of the custom made plugins.
This error only shows up at two items:
www.jcctuinenparkmachines.nl/gazonmaaiers/stiga/batterij/item/500-combi-50-s-ae
www.jcctuinenparkmachines.nl/gazonmaaiers/stiga/electrisch/item/503-combi-48-es
So we loaded the picture direct in the text window, but that is not the way it should be.
Do you know any solution?
We updated both but then the site went ballistic because of the custom made plugins.
This error only shows up at two items:
www.jcctuinenparkmachines.nl/gazonmaaiers/stiga/batterij/item/500-combi-50-s-ae
www.jcctuinenparkmachines.nl/gazonmaaiers/stiga/electrisch/item/503-combi-48-es
So we loaded the picture direct in the text window, but that is not the way it should be.
Do you know any solution?
Please Log in or Create an account to join the conversation.
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 1 week ago #154014
by Christian van Vorst
Replied by Christian van Vorst on topic Error message K2 media upload in Joomla
It's about the first line in this code:
if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
$this->file_src_mime = preg_replace("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", '$1/$2', $this->file_src_mime);
$this->log .= '- MIME validated as ' . $this->file_src_mime . '<br />';
} else {
$this->file_src_mime = null;
What to do?
if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
$this->file_src_mime = preg_replace("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", '$1/$2', $this->file_src_mime);
$this->log .= '- MIME validated as ' . $this->file_src_mime . '<br />';
} else {
$this->file_src_mime = null;
What to do?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 1 week ago #154063
by Krikor Boghossian
Replied by Krikor Boghossian on topic Error message K2 media upload in Joomla
Can you try updating to 2.7.0 or 2.7.1 (DEV version)?
Please backup before updating.
Please backup before updating.
Please Log in or Create an account to join the conversation.
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 4 days ago #154228
by Christian van Vorst
Replied by Christian van Vorst on topic Error message K2 media upload in Joomla
As I told earlier we updated to 2.7.0, but still it didn't work.
What to do?
What to do?
Please Log in or Create an account to join the conversation.
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 4 days ago #154229
by Christian van Vorst
Replied by Christian van Vorst on topic Error message K2 media upload in Joomla
Maybe something to change in the code?
Other items do upload fine for the pictures.
Other items do upload fine for the pictures.
Please Log in or Create an account to join the conversation.
- JoomlaWorks Support Team
-
- Offline
- Elite Member
Less
More
- Posts: 169
9 years 3 days ago #154259
by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Error message K2 media upload in Joomla
Hi,
What is your PHP version ?
What is your PHP version ?
Please Log in or Create an account to join the conversation.
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 3 days ago #154263
by Christian van Vorst
Replied by Christian van Vorst on topic Error message K2 media upload in Joomla
PHP version 5.6.17-1
Please Log in or Create an account to join the conversation.
- Christian van Vorst
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
9 years 1 day ago #154317
by Christian van Vorst
Replied by Christian van Vorst on topic Error message K2 media upload in Joomla
What to do now?
Please Log in or Create an account to join the conversation.
- JoomlaWorks Support Team
-
- Offline
- Elite Member
Less
More
- Posts: 169
9 years 1 day ago #154318
by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Error message K2 media upload in Joomla
If I understood correctly you mentioned that this error occured with 2 specific K2 items. Can you share the file(s) that you tried to upload in order for me to make some tests and try to reproduce the issue ?
Please Log in or Create an account to join the conversation.