Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with mediafinder generated links on October installed on subfolder after update to build 467 #5204

Closed
fgschafer opened this issue Jul 8, 2020 · 8 comments

Comments

@fgschafer
Copy link

I noticed that after updating to build 467, the mediafinder generated links don't work unless the link policy is set to "force" if October is installed in a subfolder. It would be nice to have proper support for relative links in this situation too.

@LukeTowers
Copy link
Contributor

@fgschafer I've added a note to the config file about how to properly handle this: 5a5208b

@adrian-stein
Copy link

I second this. Any word on a permanent fix?

@bennothommo
Copy link
Contributor

@adrian-stein you'll need to follow @LukeTowers notes and adjust your configuration accordingly.

@LukeTowers
Copy link
Contributor

@fgschafer @adrian-stein does it work if you set your app.url to correctly include the subfolder and leave the uploads and media URLs unchanged?

@fgschafer
Copy link
Author

fgschafer commented Sep 7, 2020 via email

@bennothommo
Copy link
Contributor

@fgschafer Thanks for clarifying, but I did not encounter that issue in the scenario you stated. The image preview appeared just fine for me.

@fgschafer
Copy link
Author

fgschafer commented Sep 7, 2020

@bennothommo Thanks. The issue is for example here.
In a custom plugin boot method:

           Event::listen(\'backend.form.extendFields', function ($form) {

            if (!$form->getController() instanceof \Cms\Controllers\Index) {
                return;
            }
        
            if (!$form->model instanceof \Cms\Classes\Page) {
                return;
            }

            $form->addTabFields([
                'settings[featured_image]' => [
                    'label'   => 'Imagen Predefinida',
                    'type'    => 'Backend\FormWidgets\mediafinder',
                    'mode'    => 'image',
                    'imageWidth' => '200',
                    'tab'     => 'cms::lang.editor.meta'
                ]
               
            ]);
        });

@adrian-stein
Copy link

adrian-stein commented Sep 8, 2020

I have changed the 'linkPolicy' to be 'force' and left the media_path and uploads_path and app.url untouched and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants