This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

yo5bdm
yo5bdm

Hello all, I don't know where to report bugs, as it is my first bug that I came accross. I developed a plugin that uses models with multiple images. Uppon upploading, the platform uploads them to /storage/app/public/ instead of /storage/app/uploads/public/. The problem is that in the view, the path is set with the latter, so the images are not visible. Where should I report this problem? I imagine I'm not the only one having it.

L.E.: This only happens after I updated to the last version a few days ago. So I'm using the last version of everything.

Last updated

daftspunky
daftspunky

Hey yo5bdm,

This is most likely due to the new configuration values found in v2:

https://octobercms.com/support/article/rn-13#system-config-changes

Specifically the new system.storage.uploads.folder key, it might be referring to the old value which was cms.storage.uploads.folder. It is possible to support both using the following code:

Config::get('system.storage.uploads.folder', Config::get('cms.storage.uploads.folder', 'uploads'));

I hope this helps!

yo5bdm
yo5bdm

Hello and thank you for the reply. I am using the Builder plugin to build the Models, so I am not really sure where to implement this, and I'm not really sure if I have to, as the platform itself uploads the files in a folder and inserts in the database the wrong link. So I'm thinking that it could be a platform problem and not something that needs programming. For printing the path, I am using the {{image.path}} command in twig (I don't know if this is relevant).

daftspunky
daftspunky

If this is your plugin, check that the configuration file contains a value for the key system.storage.uploads.folder. If this is empty it could have the same result.

yo5bdm
yo5bdm

It was empty. I created a new config folder and a file called system.php and copied the storage.uploads from the old cms. Still, same result. Maybe I'm doing something wrong here?

It's weird that it uploads to a folder and tries to read from another. Shouldn't it read from the same folder as the upload?

yo5bdm
yo5bdm

I think I forgot to mention, I wasn't updating from 1 to 2, but from 2.0 to 2.1 (or which is the lastest version). The update from 1 to 2 was done a while ago and everything worked flawlesly.

yo5bdm
yo5bdm

So, is anything that I can do, besides a clean install?

1-7 of 7

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.