OK, for now I have found an extremely crude and ugly solution that seems to work for me. If you have the same problem, you might consider this workaround to be a temporary fix.
Basically, I believe the problem to be inside /assets/components/gallery/js/mgr/tv/galtv.js.
On line 27 they insert {gal_src} into the image code, which is defined as data[’gal_src’] = data.absoluteImage on line 542. From my point of view it should rather be something like data[’gal_src’] = data.relativeImage or much better check if we want to have that relative or absolute paths.
As far as I understand the "gallery.thumbs_prepend_site_url" gallery system setting is responsible for that. Unfortunately there is a bug in modx that sets the value of this parameter to "empty" instead of "zero" or "false" (
http://bugs.modx.com/issues/3716). I can’t prove it, but I have the feeling that this is where gallery is getting it all wrong.
Here comes my fix:
Open /core/components/gallery/model/gallery/galitem.class.php and have a look at line 50-53.
case 'absoluteImage':
$value = $this->getSiteUrl().$this->xpdo->getOption('gallery.files_url').$this->get('filename');
break;
.
Change those lines to
case 'absoluteImage':
if ( $this->xpdo->getOption('gallery.thumbs_prepend_site_url') !== 1 ) {
$value = $this->xpdo->getOption('gallery.files_url').$this->get('filename');
} else {
$value = $this->getSiteUrl().$this->xpdo->getOption('gallery.files_url').$this->get('filename');
}
break;
This is stupid for several reasons, but it works for now.
Hope that this helps until someone comes up with a better solution.
Regards,
pepebe