Coded something up in Couch in an interesting way? Have a snippet or shortcode to share? Post it here for the community to benefit.
63 posts Page 5 of 7
Previous 1, 2, 3, 4, 5, 6, 7 Next
@cl, I haven't come across anybody else reporting such issue, so have no idea about the cause.

If you can persistently elicit the problem, please get me access to your setup and I'll take a look at the issue.
cl wrote: Hi, I constantly have problems with jcrop. I'm working an MAC and PC. First all things are working but after a while when updating templates on Mac the backend crashes. I guess this happens is when creating the template on PC and then updateing at MAC

log error: [21-Jul-2017 04:37:42 xxx] PHP Fatal error: Call to a member function get_data() on null in /Users/xxx/cms/addons/jcropthumb/jcropthumb.php on line 100

After removing the jcrop from the template again the backend is still gone (white screen).

any ideas?


The file structure in the error message indicates that Couch is hosted locally on your Mac. I don't speak fluent "error-message" (who does?), but it seems to be saying that jcropthumb is trying to get data from the database that doesn't exist. The Couch function get_data is trying to work with null when it should be working with something.

Are you intentionally working on a locally hosted site on your Mac? Perhaps there is an accidental cross-over between a local and remote site?

If the backend is gone (white screen), it seems like the data is being corrupted so badly by this event that it's breaking the entire functionality of the template. Try restoring the database to an earlier backup. That might also be a way to replicate the problem for trouble-shooting.

Maybe as you suggest, Windows structures data or filenames or something in a way that is poison to the Mac under the right circumstances. Let's hope not. That could be very hard to diagnose and fix.

I don't know the answer to your problem. I'm just thinking out loud in the hope that something might help.
A little more detail about accidental cross-over between a local and remote site.
This problem will trip me up especially when I'm working with images. Sometimes I'll work on my local version of a site and then transfer the results to the remote (live) server, or vice versa.

But Couch saves the full path to images in the database. If I'm not careful, when I make the transfer, my live site will end up using links to files on my local machine. When I visit the site, everything looks fine because the files are actually there on my own computer, so I don't notice the problem. But on any other computer, the images are broken. *|facepalm!|*

The same issue happens going in the other direction, when links to remote images break if I'm not connected to the internet. Otherwise, it's invisible.

I was thinking that a similar invisible mistake could be causing the problem you're having with jcropthumb.
@tim, Couch is expected to store images paths as
:products/product-cover.jpg

Please note the path consists of semicolon, folder and image filename relevant to /uploads folder.
I can see this in couch_data_text table. Global Couch config has my custom folder for uploads defined. I don't think I had any cases of broken paths that you mentioned. I'd love to know more about it, if possible. :)
@trendoman,
I guess where I've been seeing it has been in richtext areas. When I use the database utility or phpMyAdmin to download the database and move it from remote to local or vice versa, I have to run a search and replace on the database dump to change between remote-domain-name.com and local-domain-name.com to fix the problem I was talking about.

Like I said, I don't know the answer to @cl's problem. I'm just tossing out ideas to see if anything might help. Since the error message suggests that something is expected to be there and isn't - and @cl talked about working on two different computer systems - this experience I've had of something seeming to be one thing when it's actually something else came into my mind as a troubleshooting path to explore. It still could be the right general idea even if incorrect in its specifics.
Hi and thanks for the answers. The problem is defenetly on MAC MAMP Testserver. I run it on PC too with same database names and working in the cloud. So I can work on booth computers at home and at work. How ever on PC the jcrop is fine, on MAC the template is gone. It's not the first time it happens. On the final hosted page it works too.
I have an issue with this addon..
I am uploading the image, it allows me to recreate the thumbnail, it even shows me the preview after hitting crop but when I save it automatically reverts to the initial one...

Any ideas why this would happen?

Code: Select all
<cms:editable name='product_image'  type='image' order='1' group='group_pictures' /> 
<cms:editable name='my_imagethumb' type='jcropthumb' assoc_field='product_image' width='300' height='400' show_preview='1' order='2' group='group_pictures'  />


Couch v.1.4.7.
Hi there,
i have a strange problem with jcrop. Im on Couch 2.1 beta. The croping went fine, but when i save the page the whole pic is shifted to the left side and a black area is added. Please see screenshoot. When adding a new picture, saving and no touching of the generate function the pic is generated as intended. But as soon i crop the picture is like the one in the screenshoot.

Image

This is my code:
Code: Select all
<cms:editable
              type='image'
              name='main_image'
              label='Image'
              desc='Header-Bild hier einfügen'
              width='1900'
              show_preview='1'
              preview_width='240'
              enforce_max='0'
              crop='1' order='2' group='headerbild'/>

<cms:editable
              name='main_image_jcr'
              label='Header-Bild Zuschnitt'         
              type='jcropthumb'
              assoc_field='main_image'
              desc='wähle den Ausschnitt 1200x400'
              width='1200'
              height='400'
              show_preview='1'
              group='headerbild'
              order='3'/>


Any ideas what I did wrong?
Hi Christoph,

I tested your code and couldn't find anything amiss from the results.

I suspect perhaps the GD library on your installation has something to do with what you are experiencing.
Your site seems to be still on localhost so please try it again once it goes on a proper server. That should clarify things.

Keep us posted.
Hi Kamran, thanks for looking into my problems. I tested around and found a solution. I ended up with this:

Code: Select all
<cms:editable
              type='image'
              name='main_image'
              label='Image'
              desc='Header-Bild hier einfügen'
              show_preview='1'
              preview_width='240'
              order='2'
              group='headerbild'/>


so I deleted the upload sizing and it seems working now. As the full picture was never used anywere it seems it was not created through the cms. So the 1200px were calculated from the originial file which was much larger. I have a live version too and there was the same problem.

thanks anyway!!!!
Previous 1, 2, 3, 4, 5, 6, 7 Next
63 posts Page 5 of 7

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 1 guest