Cannot save crops in CB / XRouting / Contexts

Strange problem here:

MODX 3.1, CB 1.14.0-rc2

I built a site with several similar contexts that resolve to separate subfolders (not subdomains) and I use XRouting. In the context settings I have set

assets_url: /
base_url: /[AREA-1]/
http_host: [STAGE.DOMAINNAME.DE]
site_start: 4
site_url: https://[STAGE.DOMAINNAME.DE]/[AREA-1]/

in .htacess I also have this line:

RewriteRule ^([AREA-1]|[AREA-2]|[AREA-3])/assets(.*)$ assets$2 [L,QSA]

(I have to admit, that I’m not too sure if this is the correct setup, but it works so far. Well, except for one thing …)

In CB I use a repeater with image blocks. it uses the media source 3 which points basePath and baseUrl both to assets/media/images/. The folder for the images is set to Titelbilder/[[+id]]-[[+alias]]/

On the resource I can upload images (or drag them) into the CB image cropper and crop and save them fine. Nothing strange here. Images are uploaded correctly and can be cropped later.

But: if I select an image that was already on the server (by opening the media browser), I see the cropping modal with the image and the previews and everything like before, but after choosing a cropped view an pressing save, I get an error dialog:

“File /[AREA-1]/assets/media/images/[FOLDER]/[FILENAME] not found in source 3”

– Note that this points to a file inside the /[AREA-1]/assets/ …-folder, while the file really lives at /assets/media/images/[FOLDER]/[FILENAME].

So this seems to be the problem and I am not sure how much of it is my fault. And how to remedy this. Any help is appreciated!

Try setting this to /assets/media/images/ instead. Typically, baseUrlRelative = no and start baseUrl with a slash.