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

Wrong URL for images (via pinax-images) #124

Open
sumpfralle opened this issue Mar 12, 2019 · 2 comments
Open

Wrong URL for images (via pinax-images) #124

sumpfralle opened this issue Mar 12, 2019 · 2 comments

Comments

@sumpfralle
Copy link

sumpfralle commented Mar 12, 2019

I am using pinax-blog (7.0.4) and pinax-images (3.0.1).

After creating a blog post and uploading an image to the image-set (attached to that blog post), the image does not show up.

The cause seems to be a wrong image URL: https://example.org/blog/2019/03/11/blog-post-slug/pinax-images/image-set-1/4f0917bd-3392-41e8-9100-a44d9bc75c92.png

The list of blog-related configured URLs is the following (announced as part of an 404 in development mode):

blog/ ^$ [name='blog']
blog/ ^section/(?P<section>[-\w]+)/$ [name='blog_section']
blog/ ^post/(?P<post_pk>\d+)/$ [name='blog_post_pk']
blog/ ^post/(?P<post_secret_key>\w+)/$ [name='blog_post_secret']
blog/ ^feed/(?P<section>[-\w]+)/(?P<feed_type>[-\w]+)/$ [name='blog_feed']
blog/ ^manage/posts/$ [name='manage_post_list']
blog/ ^manage/posts/create/$ [name='manage_post_create']
blog/ ^manage/posts/(?P<post_pk>\d+)/update/$ [name='manage_post_update']
blog/ ^manage/posts/(?P<post_pk>\d+)/delete/$ [name='manage_post_delete']
blog/ ^ajax/markdown/preview/$ [name='ajax_preview']
blog/ ^(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$ [name='blog_post']
ajax/images/ 

Only the second to last line matches the date/slug path prefix. But it does not match the full image path.

Thus I cannot understand, how the above image URL is supposed to work.

Maybe I am missing some configuration setting? (none are specified)

Thank you!

@sumpfralle
Copy link
Author

The following nginx snippet works around this issue (in a dirty way):

    location ~ /pinax-images/image-set-(.*)$ {
        alias /home/foo/project/pinax-images/image-set-$1;
    }

@tdxdave
Copy link

tdxdave commented Nov 25, 2019

Any way we can get some insight from pinax team on how this is supposed to work?

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

No branches or pull requests

2 participants