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

Media paths are not updating to new number prefix #1500

Open
joville opened this issue Aug 20, 2018 · 7 comments
Open

Media paths are not updating to new number prefix #1500

joville opened this issue Aug 20, 2018 · 7 comments
Assignees
Labels

Comments

@joville
Copy link

joville commented Aug 20, 2018

I have a modular page which haven't been number prefixed. After setting all modular pages to number prefixes and changing the order of the modular pages the media paths are not updating to the new prefix number. I am not sure whether is a grav core or grav admin bug. I have put this issue in the admin repo because of have changed the settings in the admin (grav 1.5.0 and grav-admin 1.8.8).

@joville
Copy link
Author

joville commented Aug 20, 2018

Second issue: After setting the modular pages to use number prefixes, there are also remaining items in the modular page:

    dir: asc
    custom:
        - _teaserimage
        - _features
        ...

After deleting this manually the ordering is getting right!

@rhukster
Copy link
Member

your custom order is probably conflicting with the page order? The custom order was really the 'old' way of doing things, numeric prefix is now the preferred way.

@joville
Copy link
Author

joville commented Aug 22, 2018

Yes, I know! Was just pointing, that saving with numbered prefix did not remove the old frontmatter setting (had to do it manually). Want to give you the information that this is happening.

@anthonytournier
Copy link

Hello there,

Same problem here, with build-in reorder admin functionnality.

image
I have this blueprints on my pages. When I reorder theses pages, media path are not updated (old prefix is still in my picture path)

@ishapkin
Copy link

Hello there,

Same problem here, with build-in reorder admin functionnality.

image
I have this blueprints on my pages. When I reorder theses pages, media path are not updated (old prefix is still in my picture path)

Have same problem

@rhukster
Copy link
Member

Have you guys cleared the cache????

@ishapkin
Copy link

ishapkin commented Oct 30, 2018

Hi, thank you for answer!
Of course, i am cleared the cache before.
What i doing:

  • Created some pages by template with some custom fields in blueprints:
extends@: default
child_type: item

rules:
  slug:
    pattern: "[a-z][a-z0-9_\-]+"
    min: 2
    max: 80

form:
  fields:
    tabs:
      type: tabs
      active: 1

      fields:
        content:
          type: tab
          fields:

            header.media_order:
              unset@: true

            header.custom.avatar:
              type: file
              label: Cover image
              random_name: true
              destination: '@self'
              multiple: false
              accept:
  • After change page position with drag & drop
  • The image what i loaded in this field (header.custom.avatar) was lost in page.md
    image
  • In page.md i found old path for this file:
    image

Now i changed destination: '@self' to destination: 'static' and loading all files in static folder in webroot, but it was wrong way i think :)

@mahagr mahagr added bug and removed question labels Dec 2, 2020
@mahagr mahagr self-assigned this Dec 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants