Warehouse link questions

I am puzzled - build a test page with ‘Source’ a brief time ago. Used the ‘Container Plus’ stack to utilize a background image, and all worked super easy. However, when I tried to rebuild the ‘Lawyer’ project yesterday, the background image just never appeared.

Difference might be that I upgraded to RW 8.3 in the meantime - I think there were also ‘Source’ upgrades though. The test site https://source.gerdklose.com illustrates the problem - two simple pages, same build up, one with the image directly copied into the project (works), the other using warehousing and the RW resources (fails).

The website also reveals the root cause of the problem with the warehoused image: the project points to wrong path for the resources:

…/page/resources/ … instead of …/resources/ …

I checked, that the resources have been properly uploaded to the server. Hence the problem is ‘known’, but is it a @habitualshaker “Source”, a @isaiah “Stacks 4”, or a RW 8.3 problem ?

You image is at https://source.gerdklose.com/resources/businessman-2000w.jpg

However, RW is looking for the image at …/resources/businessman-2000w.jpg

and it should be …/…/resources/businessman-2000w.jpg

My advice is not to use resources for images. If you use the top URL it will work fine.

If you right click on the image in Resources and select ‘copy URL’ then you should be able to use that as your warehouse link.

Not sure how it would have worked before. Don’t think any changes have been made that would have changed how this works.

Thank you for your responses, I think I should have been more clear in my initial post. The site https://source.gerdklose.com has been created with nothing else but RW V8.3, Stacks V4.02, and Source V1.08 (Image V1.03, Container + V1.04). No manual ‘warehousing’, FTP-uploading, etc. - just the functionality provided ‘out of the box’

The image was simply added to the RW resources, and the right-click URL indeed shows ‘source.gerdklose.com/resources/...jpg’ - as expected. The RW upload also places the image to this location - I checked the server to confirm it. Within the RW project, I used the ‘Container Plus’ stack to add the image as ‘warehouse’ image background, AND I also used the ‘Image’ stack below to add the same image (from the RW resources) as 70% display.

Please note, that the background image in the ‘Container Plus’ stack does NOT show in the edit/ preview, nor in the published page, whereas the ‘image’ stack shows the linked image just fine (everywhere). Hence, even within the ‘Source’ environment the ‘Container+’ stack and the ‘Image’ stack behave differently.

The published page reveals via the error messages, that the ‘Container Plus’ stack is creating the wrong links to the RW resources. They are located at the root ‘…/resources/…’, but the the created link is either ‘…/files/resources/…’ (in case of the first page), or towards ‘…/page/resources/…’ (in the case of the second page). Since the ‘Image’ stack creates the proper link, it seems that this is less a problem of RW, or Stacks4, but rather already an inconsistency within ‘Source’

Since I don’t have any insights into the programming code, I want emphasise the word ‘seems’ - I think the problem coincided with my RW upgrade to V8.3, but the inconsistency is already between the ‘Container Plus’ and ‘Image’, now … hence I have great hopes, the issue can be resolved within ‘Source’.

Thank you for looking into this error - please check out my link again, I updated the site with the addition fo the ‘working’ Image stack.

Hi @GKs - the difference between the 2 examples is that the RW resources image link for the container is added within the CSS for the page (as it is for a background image) and the link for the regular image is within the html. The link in the CSS doesn’t work because that css file is within a ‘files’ folder and so the route to the resources folder isn’t the same. There is nothing that can be easily done to prevent this (without me adding another box for you to specify that you are selecting from RW resources as opposed to adding a url).

If you are wanting to warehouse images then I would always suggest adding them to your server manually via FTP and providing the link to them in RW. Or if you do want to let RW ‘warehouse’ your images then you will need to use the copy URL command I mentioned previously (though note that you will not see the image in Edit or Preview until you have published the page).

Hope that makes some kind of sense?

Hello @habitualshaker - Thank you for taking the time to explain the issue in detail. Wow, the difference between “working & failing” is the internal use in ‘CSS vs. HTML’. While I understand your explanation, this is difficult for a ‘layman’ to distinguish … the exact same handling once works, but fails the other time, yet one doesn’t know in advance, whether CSS or HTML is used internally.

You are -of course- absolutely correct, when I enter the direct URL in the entry window (as you mentioned it in your first reply), then the background appears, because I already published the resource to the server. So, yes, this way, it works even when doing the ‘warehousing’ only with RW means. I presume, one also has to be very careful, when using fonts in the RW resources and linking to them e.g. in the ‘Source’ base stack … if this is happening in CSS, the link via the ‘resources’ might end up being broken, too ?

I finally can also answer now, why my earlier testing worked: you’re right again - it had nothing to do with any updates etc. -, but for ease of testing I had dragged an ‘Unsplash’ image into my RW resources. As I learnt elsewhere, this doesn’t copy the image into the local resources, but instead directly links to the ‘Unsplash’ server. Hence in this case, the link from the RW resources is an absolute link to an external server, which works.

In conclusion, you were able to completely explain my experiences. However, I am worried other users might fall into the same ‘trap,’ as the workflow seems to be completely legit within RW (and even encouraged within RW to use their ‘Resources’ this way), yet it fails in the case of the background image.

Thank you again for explaining everything - I have certainly learnt a lot … again ;)

1 Like

Hi @GKs - glad that explained things for you.

You are right though that the selection of fonts does work differently. The link for fonts (like the container background) is used in the CSS but because I was explicitly directing people to use RW resources for their custom font I could make the adjustment required to make this work. As it happens lots of people were then asking to be able to warehouse their fonts - which didn’t work as things were because I was adjusting the path to make it work for RW resources. So we had the same situation as you initially raised but in reverse!

In the latest update to Source I set it up to enable also linking to a warehoused font. To make this work I added an additional drop-down (if Custom font is selected) asking whether the font is in RW resources or is Warehoused. I can then adjust the path (or not) depending on the answer.

I think this approach for fonts is reasonable because, unlike with images, there isn’t the option to be able to ‘drop in’ a local resource (like with the image well). I could do the same for images but my thinking is that if someone selects the ‘warehouse’ option they will (generally) know that a full url is required. I do agree that this may well be confusing for some though.

2 Likes

I think it might be easier to use the Custom Font Stack from instacks for this? It is free.

That’s a nice stack but not sure why you would need to use it with Source. Happy to hear your rationale @Fuellemann.

The Source fonts selection works perfectly whether you want to use a system font, a Google font or custom (local RW resource or warehoused).

1 Like

Ah great. I have not yet had the chance to look into Source, so I did not know. Sorry.

1 Like

And on the subject of fonts, I have had a lot of requests to add support Font Pro so will definitely be adding some native support for that in a future update.

As good as the inStacks CustomFont is for frameworks or themes that do not support local web fonts, it is not required in Source. Source has everything you need to use local web fonts and it works brilliantly no matter how you choose to use it. This is built into the free Source framework. How cool is that?

@GKs My original advice to NOT use Resources for images sticks. Resources is fine for Fonts but not images IMHO for exactly the reasons you pointed out. This is a RW issue and not a Source issue. Use absolute URL’s and you will never go wrong and also make your project files smaller and faster to load by not adding the images to the project file.

3 Likes

Thank you all for your explanations and suggestions - I am “not yet” into the fonts, but happy to soak in all your guidance and expertise.

Just want to express my gratitude again for your help - you might not be aware, of how big an asset a forum like RW4ALL is for all the beginners, all based on your generous offering of time and advice. I am glad I could pay a penny back at least via the ‘source addon’ and the new academy course … somehow should also give some support to Andrew, another pillar making RW to so much more. Thank you all!

2 Likes

I altered your title to “Warehouse link questions” to better reflect your post.

Just noticed that the incorrect CSS url ‘bug’ has been listed on the Stack’s bug tracker. When it is resolved then adding a link via any method should work fine (without me needing to ask whether you are using resources or true warehousing).

1 Like