Can´t delete image file of image field (in item form)

More
10 years 10 months ago #43280 by jrodgar
Item form
Image field
Delete Image File
Code:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 'unnamed.jpg'' at line 1 SQL=DELETE FROM joom_flexicontent_files WHERE = 'unnamed.jpg'

But going back shows: "Notice
Image/Gallery field: 'Imagen', some values of this field have been skipped: [ unnamed.jpg ], because the original file seems to have been deleted (thumbnailing of it has failed).
This message will go away once you save this content item"

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #43366 by jrodgar
Related with this, can I forbid the delete option?

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #43385 by micker
after saving item the messga will be hidden...

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #43404 by ggppdk
Hello

please test this, edit plugin file
plugins/flexicontent_fields/image/image.php

-- replace line:
Code:
. ' WHERE ' . $db->nameQuote('filename') . ' = ' . $db->Quote($filename);
with:
Code:
. ' WHERE filename = ' . $db->Quote($filename);

and retest


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #43413 by jrodgar
This worked without visible problems, thanks!

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #43419 by ggppdk
Hello

$db->nameQuote()
is for J1.5

and
$db->quoteName()
is for J1.6+

but in this case it is not needed since filename is not a reserved MySql server word and it is not a reserved word to any other SQL server either (i think)

you could also replace
. $db->nameQuote('filename') .
with
. (FLEXI_J16GE ? $db->quoteName('filename') : $db->nameQuote('filename') .

thanks for report
Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.307 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline