[solved] Image Linking issue (1.5.1)
[solved] Image Linking issue (1.5.1)
It might sound funny,
In CMS Made Simple 1.5.1, how can we hyper link a image to a target cmsms page... In the earlier I use to use " [glow=red,2,300]Insert Link to cmsms page[/glow]" (orange colored tree) to hyper link a image to a cmsms page, but in CMS Made Simple 1.5.1 I get some additional unwanted text once I use " Insert Link to cmsms page"....
Any help in this regard will be highly appreciated...
Thanks
db
In CMS Made Simple 1.5.1, how can we hyper link a image to a target cmsms page... In the earlier I use to use " [glow=red,2,300]Insert Link to cmsms page[/glow]" (orange colored tree) to hyper link a image to a cmsms page, but in CMS Made Simple 1.5.1 I get some additional unwanted text once I use " Insert Link to cmsms page"....
Any help in this regard will be highly appreciated...
Thanks
db
Last edited by Anonymous on Mon Oct 26, 2009 6:55 pm, edited 1 time in total.
Re: Image Linking issue (1.5.1)
Current stable is 1.5.3.
Could you check what happens in that release, as changes have been made in the later versions...
Ronny
Could you check what happens in that release, as changes have been made in the later versions...
Ronny
-
- New Member
- Posts: 5
- Joined: Thu Oct 23, 2008 1:47 pm
Re: Image Linking issue (1.5.1)
I am experiencing the same problem with 1.5.3. The CMS Self Link option doesn't work on images. It takes an image tag and converts it into something like this:
When I save the page and view it, Smarty complains:
Code: Select all
{cms_selflink page="home" text="<img style="width: 300px; height: 33px;" src="uploads/headline_welcome.gif" alt="" />"}
I'd guess that this is because the attributes in the image tag aren't escaped. I don't recall having this issue before, but I'm not sure I ever tried making an image into a link to a internal page before.string(131) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: 'right;' (Smarty_Compiler.class.php, line 1547)" string(137) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: 'margin-left:' (Smarty_Compiler.class.php, line 1547)" string(130) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '15px;' (Smarty_Compiler.class.php, line 1547)" string(138) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: 'margin-right:' (Smarty_Compiler.class.php, line 1547)" string(271) "Smarty error: [in content:content_en line 1]: syntax error: invalid attribute name: '15px;" src="uploads/images/PerformanceBlockFP2009-NOB.jpg" alt="" width="260" height="360" />
Re: Image Linking issue (1.5.1)
You can usemr_compsci wrote: I am experiencing the same problem with 1.5.3. The CMS Self Link option doesn't work on images. It takes an image tag and converts it into something like this:
When I save the page and view it, Smarty complains:Code: Select all
{cms_selflink page="home" text="<img style="width: 300px; height: 33px;" src="uploads/headline_welcome.gif" alt="" />"}
Alby
-
- New Member
- Posts: 5
- Joined: Thu Oct 23, 2008 1:47 pm
Re: Image Linking issue (1.5.1)
Sure, that works, but is this a bug and will it be fixed? Some of my users are only comfortable with the WYSIWYG editor (isn't that the point of a CMS?) and won't be willing to try using smarty tags.
Re: Image Linking issue (1.5.1)
Then I have not problem with correct quotes:mr_compsci wrote: Sure, that works, but is this a bug and will it be fixed? Some of my users are only comfortable with the WYSIWYG editor (isn't that the point of a CMS?) and won't be willing to try using smarty tags.
{cms_selflink page='home' text=''}
Alby
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: Image Linking issue (1.5.1)
I agree with mr_compsci. I have the same trouble too. Let me explain what happens when I try to make an existing image a cmsms link:
Open the page to edit content.
Single click the image I want to link.
Image shows with "squares" around it.
Click orange link icon (horse).
Select page I want to link to.
Text {cms_selflink page="class-6m" text=" appears before link and text "} appears after link.
Click apply button.
In the site I get an error message before the image, which does correctly link:
string(158) "Smarty error: [in content:content_en line 3]: syntax error: invalid attribute name: '1-2" width="300" height="212" />"' (Smarty_Compiler.class.php, line 1547)"
This is the HTML for the part that is causing the error:
{cms_selflink page="class-6m" text=""}
Yes, alby, I can edit the HTML in the way that you show and the problem is resolved. But, as mr_compsci says, lots of users are not capable of doing that...
Open the page to edit content.
Single click the image I want to link.
Image shows with "squares" around it.
Click orange link icon (horse).
Select page I want to link to.
Text {cms_selflink page="class-6m" text=" appears before link and text "} appears after link.
Click apply button.
In the site I get an error message before the image, which does correctly link:
string(158) "Smarty error: [in content:content_en line 3]: syntax error: invalid attribute name: '1-2" width="300" height="212" />"' (Smarty_Compiler.class.php, line 1547)"
This is the HTML for the part that is causing the error:
{cms_selflink page="class-6m" text=""}
Yes, alby, I can edit the HTML in the way that you show and the problem is resolved. But, as mr_compsci says, lots of users are not capable of doing that...
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Re: Image Linking issue (1.5.1)
I agree, the WYSIWYG editor is crucial for many users. The more smoothly integrated CMSMS and TinyMCE are, the better.mr_compsci wrote: Sure, that works, but is this a bug and will it be fixed? Some of my users are only comfortable with the WYSIWYG editor (isn't that the point of a CMS?) and won't be willing to try using smarty tags.
The problem appears in 1.5.4, as well. It looks like a bug. As an experiment, I modified TinyMCE.module.php to use single quotes around cms_selflink's text= argument, instead of double quotes. That seemed to resolve the problem in my test case. Although, I suspect it might be prudent to also escape single quotes in the selected text argument string, in case it contains single quotes.
I'll submit a bug report.
Edited: changed term 'parameter' to 'argument' for clarity.
Last edited by fredp on Tue Aug 18, 2009 9:38 pm, edited 1 time in total.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
- Abraham Lincoln
Re: Image Linking issue (1.5.1)
I just checked in the 1.6 release and do NOT get the error... After inserting an image, and then selecting the image, for a link to a CMSMS page, the link is inserted, and working....
Better check in the 1.6 release, which is to be released at 15-16 june.
Ronny
Better check in the 1.6 release, which is to be released at 15-16 june.
Ronny
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: Image Linking issue (1.5.1)
That's great news RonnyK.
I will look out for that release.

To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Re: Image Linking issue (1.5.1)
The problem is that the self_link uses {cms_selflink} style, go to tiny admin and the advanced tab and change the self link to style and it will use the image instead of the text of image link to make a link...
Re: Image Linking issue (1.5.1)
Hi Mark,mark wrote: The problem is that the self_link uses {cms_selflink} style, go to tiny admin and the advanced tab and change the self link to style and it will use the image instead of the text of image link to make a link...
Thanks for the post! I was under the, probably false, impression that the style was a "legacy" style and that {cms_selflink} style was the new/preferred way to go. I hadn't thought to try style to see if it behaved differently. I now see that the style user interface will be much more familiar to my client. Since this solves a couple of my concerns at once, I'll stick with it and see how far I can get.
Thanks again,
Fred P.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
- Abraham Lincoln
Re: Image Linking issue (1.5.1)
I think the main issue of function.cms_selflink.php between 1.5.4 and 1.6 iis that in 1.6 release there's these lines
345
361
439
not present in 1.5.4 version.
All text in selflink is html escaped.
345
Code: Select all
$label = cms_htmlentities($label);
Code: Select all
$title = cms_htmlentities($title);
Code: Select all
$linktext = cms_htmlentities($linktext);
All text in selflink is html escaped.
Re: Image Linking issue (1.5.1)
Blast2007 you are truly a man amongst men.
I have a site in development and after upgrading to 1.62 all my rollover faded image links turned to a bunch of text,
i removed the 3 lines you flagged up and we are rolling now to upgrade the online version
Thank you
Test site is http://www.daviesbatt.co.uk/cavendish/
I have a site in development and after upgrading to 1.62 all my rollover faded image links turned to a bunch of text,
i removed the 3 lines you flagged up and we are rolling now to upgrade the online version
Thank you
Test site is http://www.daviesbatt.co.uk/cavendish/
Re: Image Linking issue (1.5.1)
tonybatt wrote: Blast2007 you are truly a man amongst men.

There is an open bug for this issue.
We hope it will receive a reply from dev members.
regards
blast