Import article don´t save language, breaks on load article

More
11 years 2 months ago #46222 by jrodgar
Hi!

Just wanted to share

When you import articles with a file associated, the file is correctly uploaded, nowadays, the file doesn´t have a language associated, whatever the language option is selected. Seeing the database confirm this, because new files imported this way have an empty language field, and adding a proper value on it, fix the problem. Let me know if you need more details.

Detected on 2.1.3 r1857
Not a problem on 2.1.2 r1804

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

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

More
11 years 2 months ago #46254 by ggppdk
Hello

you mean the file is not displayed in item view if file language is not set ?


-- 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
11 years 2 months ago #46267 by jrodgar
Actually it breaks the page load if an article have a file with language not set (null value on table)

And the issue comes from the issue that when importing articles with files associated, this files are not saved with a language associated.

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

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

More
11 years 2 months ago #46268 by ggppdk
Hello

ok file field does not handle empty language

patch plugin file with a fix to consider empty language as language ALL
file.php

just before:
Code:
if ($display_lang && $file_data->language!='*') // ... skip 'ALL' language ... maybe allow later

add:
Code:
$file_data->language = $file_data->language=='' ? '*' : $file_data->language;


will test and commit this fix

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.

More
11 years 2 months ago #46276 by jrodgar
I have tested this with no visible problems, I´ll let you know otherwise.

Maybe would be good to also ensure on the import side to upload the file with a language selected

Unless otherwise indicated:
Joomla 3.8.1
Flexicontent 3.2.1.7

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

More
11 years 2 months ago #46280 by ggppdk
Hello

ok

will add a default value for upload task in the backend filemanager controller:

administrator/components/com_flexicontent/controllers/filemanager.php

replacing:
$obj->language = $filelang;
with:
$obj->language = ($filelang ? $filelang : '*');


-- 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.324 seconds
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
Save