edit content image stays empty

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

edit content image stays empty

Post by thomahawk »

Using CMSMS 2.2.20 “Saguenay”

Since I put {content_image} into my layout, automatically on the main tab of content edit, an input field for image appeared. Very convenient for the backend users. The original input field under the options tab is still there too, thats ok.

The big problem now is, when I choose an image in the main tab, it is not saved. when open again, the field is empty again.
Only when I set an image in the option tab, it gets saved.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1713
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: edit content image stays empty

Post by DIGI3 »

I was not able to recreate this on a clean 2.2.20 install. Can you experiment a bit more and see if there's a specific usage that makes it happen reliably? e.g. it's in a child template or assigned to a variable etc. Feel free to include the full tag you're using, and/or the page template.
Not getting the answer you need? CMSMS support options
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

Re: edit content image stays empty

Post by thomahawk »

well, the full tag is
{content_image class='breit radius-oben' block='image' alt='Themenbild Ziegelei Museum'}

and the behaviour is constant. I can not on any page save a chosen image in the main tab. But it always works in the option tab.

BUT, I had one page where I did set an image in main tab before when I still was on 2.2.19 that was saved and it stayed in the main tab image field.
When I now cleared both image fields (tab and options) and tried to set it again in the main tab, now in 2.2.20, it was also not possible anymore.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1713
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: edit content image stays empty

Post by DIGI3 »

Try giving the block a name other than 'image'
{content_image class='breit radius-oben' block='anotherimage' alt='Themenbild Ziegelei Museum'}
Not getting the answer you need? CMSMS support options
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

Re: edit content image stays empty

Post by thomahawk »

Ah, OK, I see now what happened.

Of course you are right. I gave it another name, now it works.

There are two things now about this:

1. I was simply trying to incorporate that content_image field of the content editor into my layout, and I did what some guide showed me to do, identify which field to use with define block='image'. Yes I was surprised when after that suddenly I had an image field on the main tab too. But I found that convenient and it worked.

2. That it did not work anymore after the update to 2.2.20 now leaves the question:
Was it right before in 2.2.19 where two identical fields both appeared and both worked? Or is it right now, when two fields wo have the same ID are both shown, but only one of them works ?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1713
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: edit content image stays empty

Post by DIGI3 »

As far as I know, naming it 'image' has always caused it to not work. I believe this is because the variable is used somewhere else but I'm not sure. I don't think it would have changed from 2.2.19 to 2.2.20, that might be a red herring.

It wouldn't be anything to do with two fields having the same name, that has always thrown an error. This issue is specifically for the name 'image'.
Not getting the answer you need? CMSMS support options
User avatar
thomahawk
Power Poster
Power Poster
Posts: 312
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

Re: edit content image stays empty

Post by thomahawk »

Thank you, Digi
Post Reply

Return to “CMSMS Core”