The site is in Multilingue mode.
it supports 4 languages.

i uploaded a footer pictures but:
- In the Administrator menu it is shown only on one of the languages (the first on which I uploaded it)
- In the public interface: is shown everywhere it's needed

After a while and I have not clue what's causes this, the first language looses the picture.
- In the admin menu it disappears
- the public interface: all the languages have it, but the language where i uploaded it and lost ti: not any background

And as result: the error reported into the screenshot

EDIT

the name of the theme is SIZZLE. I just changed it into "AL_PARMA"to distinguish it from SIZZLE.
However the issue there is even with the original name

EDIT II

if I ad these lines

+ 165	print_r($footer_background_image_fid);
+ 166       exit;

I got "305" .. tu sthe FID exists
but when the line 164 is executed

$footer_background_image = file_load($footer_background_image_fid);

the variable $footer_background_image is empty

trying
print_r($footer_background_image_fid);

it returns totally blank

It's like the file disappeared. is it possible?

EDIT III

I tried to reload the file.
It takes it and it assignes it a new FID.
Thus I got 306 isntead of 305. But the error is still up there like in the screenshot

After further researches I found that:

in the database the file still exist. but the FID is 306 (see the screenshot file_footer.JPG)
and even the file is at its place (see the screeshot file_footer_ftpzilla.JPG).

Something into the function that should individuate the file, then, is badly working.

not only that .. Now the icon of the picture is visible into the administration menu (see the screenshot file_footer_admin.JPG)
BUT if I click on REMOVE it doesn't remove it at all.

Is this package tested properly please? Especially under Internationalization?
'Cause it seems there is a big lack of test on it.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HyperD created an issue. See original summary.

HyperD’s picture

Issue summary: View changes
HyperD’s picture

Issue summary: View changes
HyperD’s picture

Issue summary: View changes
HyperD’s picture

Issue summary: View changes
FileSize
60.04 KB
47.87 KB
23.89 KB
HyperD’s picture

Please any help here?

HyperD’s picture

I noticed that:

- first the pointer to the file is lost hus the object is empty.
- Then the phisical file and the references into the table File are removed

There is something is corrupting the DB for soem reason.
I'm very concerned about

shadcn’s picture

Looking into this.

HyperD’s picture

I think the issue is due the multilanguage.
In fact the footer is divided in 4 footers now (one for each language I installed)
But when I upload the footer image in oen fo the language, and I want to delete it: it's impossible.
And if I load another one into another language: it doesn't upload it.

then after a while, it removes the file om the file system and the pointer from the DB, creating the error

shadcn’s picture

How did you create the 4 footers? Is it on the same theme?

HyperD’s picture

FileSize
55.08 KB

Once I installed the i18 modules, automaticlaly Drupal presneted me 4 footers: one for each language.
Please here below the screenshot "4_footers.JPG".

I select each language and in theory I can upload 4 different footers (one for each language).

In the reality it acpet only 1 footer.

I means

- You upload a picture for each footer
- Into the database (file tables) 4 files are pointed
- Into the filesystem 4 files are uploaded

BUT
Into each footer: on the tab FOOTER, only the first language you uplodade the file, a thumbanil is shown into the field: Background image.

The footer is up there for a while. but then after few hours, the error (about this Thread) is generated.
And in the first instence:
the database and the filesystem is untouched.

BUT (again) after more or less one or 2 hours: the database is altered and the pointers to the files are lost, and the files are removed from the filesystem

This concerns me a lot. I can't find the way to solve this issue

HyperD’s picture

FileSize
108.98 KB
51.51 KB
98.67 KB

arshadcn please look this.

i got a couple of screenshots that who something disturbing.

The background and footer files, are stored into the database as TEMPORARY files!
Check the attachments "temporary.JPG",
"temporary_0.JPG",
"temporary_1.JPG"

While all the other files in Drupal are stored as permanent.
if i'm not wrong, this is something related with RADIX, cause it is the one that generates the upload form (correct me if I wrong)

However, in order to switch off the error I did in this way:

I manually set up the flag to 1 instead of 0 on the database (but it shouldn't be in this way). AND I had to manually modify the template.php in this way:

P.S. the line 158: I forced the code to read the database of the file. Indeed the function theme_get_setting('site_background_image') till get NULL value into the default language theme.

155 // Add the site background image.
156   if ($site_background_image_fid = theme_get_setting('site_background_image')) {
157     $site_background_image = file_load($site_background_image_fid);
158 	  $site_background_image = file_load(349); // Emergency
159     $site_background_image_url = file_create_url($site_background_image->uri);
160    drupal_add_css('body { background-image: url("' . $site_background_image_url . '") }', array('type' => 'inline'));
161   } else {
162     $site_background_image_url = '/' . $theme_path . '/assets/images/bg/bg_sides.jpg';
163   }
164   drupal_add_css('body { background-image: url("' . $site_background_image_url . '") }', array('type' => 'inline'));
165 
166   // Add the footer background image.
167   if ($footer_background_image_fid = theme_get_setting('footer_background_image')) {
168     $footer_background_image = file_load($footer_background_image_fid);
169     $footer_background_image_url = file_create_url($footer_background_image->uri);
170     drupal_add_css('.footer { background-image: url("' . $footer_background_image_url . '") }', array('type' => 'inline'));0
171   }
172   else {
173     $footer_background_image_url = '/' . $theme_path . '/assets/images/bg/bg-footer-default.jpg';
174   }
175   drupal_add_css('.footer { background-image: url("' . $footer_background_image_url . '") }', array('type' => 'inline'));

EDIT

the function

radix_form_system_theme_settings_submit($form, &$form_state)

is NOT taken by the system.

I tried to put the instructions:

print_r($file);
exit;

After line 129 on theme-settings.php of both: restaurant_radix and sizzle.
in NO cases, during the submission of the form, these lines were executed.

it means that soemthing else is used isntead, and it doesnt execute even the instructions

file_usage_add()
and
variable_set()

indeed the table file_usage doesn't contain anything realted the template
AND the instruction

$file->status = FILE_STATUS_PERMANENT;

doesn't work either. This is a probable cause that the file is not set as permanent by as temporary.

shadcn’s picture

Assigned: Unassigned » shadcn

I was away this weekend. Getting back to this now.

shadcn’s picture

So, turns out when you enabled the variable translation module, the theme settings were not being saved. We just pushed a fix for that. It should fix both this issue and #2659822: Call to undefined function restaurant_radix_form_variable_realm_variable_theme_form_submit.

Here's how you can test (since there is no official release yet):

  1. Download and extract the development version for restaurant_radix to /home/deboezer/public_html/restaurant2/profiles/restaurant/themes: https://ftp.drupal.org/files/projects/restaurant_radix-7.x-1.x-dev.tar.gz
  2. Download and extract the development version for sizzle to /home/deboezer/public_html/restaurant2/profiles/restaurant/themes: https://ftp.drupal.org/files/projects/sizzle-7.x-1.x-dev.tar.gz
  3. Clear the site cache.
  4. Visit the settings page: /admin/appearance/settings/sizzle.
  5. Test.

Let me know if this works.

HyperD’s picture

There are new issues:

all the settings related:

the background of the main page, the background of the footer, the footer, the text I put into the footer: are disappeared.

I have to recover the saved database now and put the old Sizzle to have them back

shadcn’s picture

If you upload new images, are they saved properly now? Can you upload different images per language?

HyperD’s picture

The only images i can upload for different languages are: the Logo (but also before this release it was possible) and the Favicon.

There is not any field to upload any other image, rather than the 2 above.
Nor field for text.

shadcn’s picture

Can you send me a screenshot of your theme settings page please?

HyperD’s picture

Ok here I am.

I retried to refresh the DB (using a backup) and I re-installed the 2 modules you gave me.

As result:

CSS: the orange separation lines of the category into the Menu are disappeared .. (this is a minimumm issu easily fixed just replacing all the CSS files with the old ones.)

FOOTER: I uploaded into the italian Language an image. Once I saved it: the image was displayed. BUT: clicking on "remove" it is not removed at all

BACKGROUND: to replace the dark gray, always with italian language, i uploaded a background. but it is not displayed at all. It still the dark grey. Coming back to the setup, the thumbnail was displayed. However I clicked on remove: it is not removed.
.

LOGO: it works. but it has always worked

I have not clue if the footer image disappears after a while 'cause normally it does after 1 day and I need urgently to be back to the old theme while I will deploy a "Dev" machine in order to continue to help you to investigate these issues

Thus I have to reinstall the old restaurant_radix as well, otherwise the old theme is broken

The only one issue solved:
I confirm that issue at the link here below:
#2659822: Call to undefined function restaurant_radix_form_variable_realm_variable_theme_form_submit.
is solved

HyperD’s picture

FileSize
62.05 KB

Please check the Ghost_BG.JPG attachment

you see the htubnail. clicking on remove: nothing is removed.
But if ever I click on Save: the error: The file used in the Background image field may not be referenced.
appears ... and I can't save anything or cahgne anything

EDIT I
If I manually add into the table file_usage the followign data (on my case)

fid = 350 (it's the FID on my case)
module: image
type: default_image (I didn't know what to write)
id: 79 (this ID was free)
count: 4 (I put 4 'cause I have 4 languages and I uploaded it 4 times)

I finally can save without tthe above error.
BUT THEN: suddenly it appears a new record on the same table (which never apepared in any situation before)

fid: 350
module: sizzle
type: theme
id: 1
count: 1

Even in this way I cannot delete the file clicking on remove

Thus I removed the record I made manually
Then re-edited once again clicking on REMOVE.
NOthing to do: the file is NOT removed.

But coming back to the table file_usage, I got the fid 350 with count: 2 instead of 1

EDIT II

When you have done all of this, adn you are again back one time to settings page FINALLY you can remove the file, clicking on REMOVE!
You save, then you are on the main page of the site, you go to the language where the file was removed and ... it still shown :-/
Reloading a different image, it is shown only into the thumbnail. When you save it: the old one still shown.

Thus back again one time to the settings page, trying to remove the new one: no way out. I have to redo everything above manually.
Clearly, something into the functions that should manage the files is poorly functioning

HyperD’s picture

I added 2 edits to the previous message.
I hope it can help to understand what's going on

shadcn’s picture

Do you have Global theme settings checked under /admin/config/regional/i18n/variable? See:

HyperD’s picture

Yes I did it.

But even if I remove it, the issue doesn't solve.

i tried yesterday till late in the night and this moring on the DEV machine ...

shadcn’s picture

Status: Active » Needs review

Can you confirm if this is what you're trying to do? See the video here: https://www.youtube.com/watch?v=SFTAWa1dxZ0

HyperD’s picture

Yes I do confirm

HyperD’s picture

Ok I finally discovered something can be helpful

https://www.youtube.com/watch?v=zSqfKhu67kQ&feature=youtu.be

In other words:
there is a conflict between: the selected language into the theme tabs and the one into the URL.
In the video you can see what's going on.

HyperD’s picture

not only it should be also investigated why the bg footer once removed, stil visibile even after have cleaned the cache.

shadcn’s picture

Status: Needs review » Closed (outdated)

Have you been able to fix this? I'm marking this as outdated for now. Please reopen it not. Thanks.