close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Image resizer within Site assist site using CMS

Thread began 1/16/2012 4:30 pm by gjy5199349551 | Last modified 1/20/2012 6:20 am by Jason Byrnes | 3135 views | 10 replies |

gjy5199349551

Image resizer within Site assist site using CMS

Hi,

I am having an issue applying image resize SB within a DA repeating table to create a small image gallery, the initial page was created with site assist and has the appropriate content block for all the text on the page. When applying the image resize it generates an erro message concerning a redeclaration of rel2abs() function between the webassist\caching\CachedResize_Image.php file and the \WA_CMS\WA_CMS.php file line 32, if I remove the require WA_CMS.php line it displays a blank page, if I move the declaration to the top of the page, preceding the require /webassist/caching/CachedResize_Image.php statement it displays error messages about imagejpeg() function located in the CachedResize_Image.php file on line 212, when created on a new blank php page the gallery displays without issue. Any assistance would be great as I need to apply this same system to several pages within this site.

Regards,

Gary

Sign in to reply to this post

Ray BorduinWebAssist

I think the best way to resolve this issue is to add an if statement around the function declaration in both files.

if (!function_exists(rel2abs)) {

function rel2abs() {

[code here]

}

}

I apologize for this inconvenience... if you want to send me copies of the two files where the function is declared I can add the necessary IF statements and send them back to you.

Sign in to reply to this post
Did this help? Tips are appreciated...

gjy5199349551

Error files attached

Fatal error: Cannot redeclare rel2abs() (previously declared in \webassist\caching\CachedResize_Image.php:324) in \WA_CMS\library.php on line 21

This is the exact error received, I am uploading the files as requested to have them edited, thanks in advance Ray

Attached Files
error_files.zip
Sign in to reply to this post

gjy5199349551

Additional error

fyi, In the case where the library.php file is called prior to the CachedResize_Image.php file this is the error occurring:

Warning: imagejpeg() [function.imagejpeg]: Unable to open '../image_cache /images/100/proportion/image_09_w75_h50/image_09_01161024.jpg' for writing: Invalid argument in \webassist\caching\CachedResize_Image.php on line 207

Sign in to reply to this post

gjy5199349551

Additional error after functions added

Hi,

I wrapped the two offending functions the way you recommended and created a further error, the images now display but the CSS MW portions break and the remainder of the page layout after the images breaks down as well.

Notice: Use of undefined constant rel2abs - assumed 'rel2abs' in \WA_CMS\library.php on line 2

Notice: Use of undefined constant abs2rel - assumed 'abs2rel' in \WA_CMS\library.php on line 23

Gary

Sign in to reply to this post

Jason ByrnesWebAssist

here are updated copies of the WA_CMS/WA_CMS.php and webassist/caching/CachedResize_Image.php that should correct the problem.

Attached Files
Archive.zip
Sign in to reply to this post

gjy5199349551

Thanks guys, works fantastic now!

Sign in to reply to this post

gjy5199349551

I give up

I was able to apply this sb to two pages without issue after replacing the files you repaired, on the third installation I performed the same steps and receive the following error:

Warning: imagejpeg() [function.imagejpeg]: Unable to open '../images/102/thumbnails/development/barrierParent/barrierbrakers/images/102/proportion/photo_in_a_photo_frame_of_me,_Dad_and_Carol_at_Carmel_w73_h75/photo_in_a_photo_frame_of_me,_Dad_and_Carol_at_Carmel_01190725.jpg' for writing: Invalid argument in C:\xampp\htdocs\development\barrierParent\barrierbrakers\webassist\caching\CachedResize_Image.php on line 207

All pages are in the same directory on my local server, all pages created from the same site sculptor templage, all have the same CMS content applied and all image directories have been set to 777 to ensure it was not a permissions issue, any thoughts would be greatly appreciated.

Thanks,

Gary

Sign in to reply to this post

Jason ByrnesWebAssist

the error is caused by the image file name having a comma in it.


it looks like the file name is:
photo_in_a_photo_frame_of_me,_Dad_and_Carol_at_Carmel.jpg

when naming files for use on the web, you should avoid using special characters.

Use only letters and numbers, the only exception to this rule is the underscore.

Sign in to reply to this post

gjy5199349551

Solved

So, I removed all the incorrect carachters in the image names with no improvement (should have caught that one), recreated the page from a blank php page, using the default image resizer cache folder to ensure permissions set by the SB, no improvement, the ultimate issue turned out to be the length of the file name, shortened all names and the layout magically appeared correct.

Thanks for all the quick responses to my foolish mistakes, as an IT support person myself I understand how frustrating it can be to deal with someone who is causing their own problems, and you guys should understand users like myself truely appreciate the assistance you are providing.

Regards,

Gary

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...