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

Related Pages Link not being published #177

Closed
am071092 opened this issue Mar 7, 2019 · 9 comments
Closed

Related Pages Link not being published #177

am071092 opened this issue Mar 7, 2019 · 9 comments

Comments

@am071092
Copy link

am071092 commented Mar 7, 2019

I have created and published two pages :

  • Page A
  • Page B

Added Page B as a link to the Related pages section on Page A and republished.

The Related pages section doesn't appear on the page.
It only appears when view viewing the page as a logged in user.

Here are package versions being used:
"cwp/cwp-recipe-core": "2.2.1@stable",
"cwp/cwp-recipe-cms": "2.2.1@stable",
"silverstripe/recipe-blog": "1.1.3@stable",
"silverstripe/recipe-form-building": "1.2.1@stable",
"silverstripe/recipe-authoring-tools": "1.2.1@stable",
"silverstripe/recipe-collaboration": "1.2.1@stable",
"silverstripe/recipe-reporting-tools": "1.2.1@stable",
"cwp/cwp-recipe-search": "2.2.1@stable",
"silverstripe/recipe-services": "1.1.3@stable",
"silverstripe/subsites": "2.2.0@stable",
"tractorcow/silverstripe-fluent": "4.2.0@stable",
"silverstripe/registry": "2.1.0@stable",
"cwp/starter-theme": "2.0.3@stable",
"cwp/watea-theme": "^2.1"

@robbieaverill
Copy link
Contributor

Thanks for reporting @am071092.

The problem is that BasePage declares a many many through relationship to RelatedPageLink, which is versioned, but doesn't define ownership permissions for it to be automatically published when the BasePage is published.

I'll patch this in CWP, but as a workaround you can add this to your project code:

# File: app/_config/cwp177workaround.yml

# Remove this file once updated to CWP 2.2.2
CWP\CWP\PageTypes\BasePage:
  owns:
    - RelatedPagesThrough

@robbieaverill
Copy link
Contributor

PR at #178

@am071092
Copy link
Author

am071092 commented Mar 8, 2019

@robbieaverill Thanks will try that!
Also, I've noticed that you can't remove the related page from the page? The only option available is archive.
Is "un-linking of related pages" something that will be implemented in the future?

@robbieaverill
Copy link
Contributor

Wow, that's bad. I'll log a new issue for that.

@robbieaverill
Copy link
Contributor

@am071092 see #179

@am071092
Copy link
Author

am071092 commented Mar 8, 2019

@robbieaverill cool thanks
I added that file to app/_config but that didnt fix the issue. I ran dev/build?flush=all. Am I missing anything?

@am071092
Copy link
Author

am071092 commented Mar 8, 2019

@robbieaverill Just had to republish to get it to work :)

@matt-in-a-hat
Copy link

If I had a large set of related pages in a SS3 site that I upgrade to SS4, these RelatedPageLink objects that used to show are now versioned and don't seem to be published by default. How should I go about making all those pre-existing relations published?

@robbieaverill
Copy link
Contributor

@matt-in-a-hat for anything to do with data migration I would suggest writing BuildTasks that are designed specifically for your use case.

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

No branches or pull requests

3 participants