CMS MADE SIMPLE FORGE

Gallery

 

[#4669] Templates are not properly saved

avatar
Created By: vidaest (vidaest)
Date Submitted: Thu Mar 11 05:15:57 -0500 2010

Assigned To: Jos (josvd)
Version: 1.2.1
CMSMS Version: None
Severity: Major
Resolution: Awaiting Response
State: Closed
Summary:
Templates are not properly saved
Detailed Description:
When editing a template (i.e. Lightbox) there are 3 forms on page (template,
css, javascript). If you change something and try to save and then go to editing
again you'll see that only the text in the 1st form is saved, and template-css
and javascript are lost. That's why the strange errors after updating a
template. I looked in the database and there too the css and javascript are
missing.


History

Comments
avatar
Date: 2010-03-11 06:11
Posted By: Jos (josvd)

I can not reproduce this. Please turn debug on in config.php and look for error
messages while saving a template.

The css field will also be saved as a file lightbox.css in modules/Gallery/css/
Please check if this file gets changed right.
      
avatar
Date: 2010-03-11 06:29
Posted By: vidaest (vidaest)

I see the css files in modules/Gallery/templates/css. After updating a template
Fancybox (just saving it without any update actually) the file  Fancybox.css is
gone. Just checked that. Saving gives me the following debug output:

Notice: Undefined index: templatecss in
/home/...mydirectory.../modules/Gallery/action.do_edittemplate.php on line 34

Notice: Undefined index: templatejs in
/home/...mydirectory.../modules/Gallery/action.do_edittemplate.php on line 34
Debug is on. Redirecting disabled... Please click this link to continue. 
...link...


I checked and that's the line where template is saved ($this->SetTemplate(...)).

regards, m.
      
avatar
Date: 2010-03-11 09:42
Posted By: Jos (josvd)

The template form should send the fields templatecss and templatejs. They should
be received as varables $params['templatecss'] and $params['templatejs'].
Apparently they are not received, and thats why the fields go blank and the css
file gets deleted.

I don't get it why those variables don't come through.

How did you install the module? With ModuleManager or FTP? Could it be there are
corrupt files?
      
avatar
Date: 2010-03-11 10:55
Posted By: vidaest (vidaest)

I installed it via module manager. I'm using mle .1.6.6. 
      
avatar
Date: 2010-03-11 10:55
Posted By: vidaest (vidaest)

I installed it via module manager. I'm using mle .1.6.6. 
      
avatar
Date: 2010-03-13 07:30
Posted By: Jos (josvd)

I did a fresh install of MLE 1.6.6 and installed Gallery 1.2.1 via
ModuleManager. I can succesfully change templates, without getting empty css-
and javascript fields.

I'm sorry I can't reproduce the issue. You'll have to provide more debug-info or
this will get a "works for me" resolution.

You could try de-installing, deleting and new installing Gallery. That won't
delete your images, just removes the titles/descriptions and templatesettings,
so you'll have Gallery up and running very quickly again.
      
avatar
Date: 2010-03-24 04:57
Posted By: vidaest (vidaest)

I deleted & reinstalled. I still get the same issue. When in Template editor for
lightbox I just click save without changing anything. I get (in debug mode):

Notice: Undefined index: templatecss in action.do_edittemplate.php  on line 34

Notice: Undefined index: templatejs in action.do_edittemplate.php on line 34
Debug is on. Redirecting disabled... Please click this link to continue.

After this the js and css are gone.
      
avatar
Date: 2010-03-24 05:00
Posted By: vidaest (vidaest)

However, resetting to default restores them correctly.
      
avatar
Date: 2010-03-29 08:54
Posted By: Jos (josvd)

Is the template source field saved completely at the moment the templatecss and
templatejs get lost? Or could it be it goes wrong on a strange character?
      
avatar
Date: 2010-03-30 02:53
Posted By: vidaest (vidaest)

Yes, the source field is saved properly. I doubt there are strange chars though.
css and js are gone even when not changing anything in any field, just hitting
save button. Php says invalid index and that's what I think gets it messed up.
      
avatar
Date: 2010-05-21 11:28
Posted By: Jos (josvd)

If this is still an issue, i would like to take a look in your admin with debug
on. Please email me
      
Updates

Updated: 2010-07-22 04:53
state: Open => Closed

Updated: 2010-03-23 10:26
resolution_id: 5 => 10

Updated: 2010-03-11 06:11
resolution_id: => 5