Closed ibrahimjaved12 closed 1 month ago
@umar8hassan The changes here have a critical side effect. They don't allow us to publish ocw-www
to live
anymore, with the same validation required that "metadata" is required before we can publish. But ocw-www
will not have metadata.
In static/js/components/PublishDrawer.tsx:
const isPublishDisabled =
!publishingInfo.hasUnpublishedChanges ||
(!website.has_site_metadata && publishingEnv === PublishingEnv.Production)
For ocw-www, website.has_site_metadata
will always return false. Looking at the ticket, I don't think we're required to have any kind of checks for ocw-www
either way. There could be different ways to go about this to allow publishing ocw-www into live
. We have name
, short_id
, title
, starter
in type Website
each which would be distinct for ocw-www
.
Please make changes for this as you see fit.
Looks good to me 👍🏻
@pdpinch this is has been tested on RC. Wanted to have your take on this before deploying it to production.
What are the relevant tickets?
Fixes #1996 This is a copy of this PR https://github.com/mitodl/ocw-studio/pull/2015. The original PR is based off forked repository, due to which we couldn't run all workflow checks.
Description (What does it do?)
You can add content to a course and publish it in staging without ever visiting the Metadata section. Production, however will require metadata to be set.
Screenshots (if appropriate):
How can this be tested?
Additional Context
The
course-v2/layouts/partials/course_banner.html
file was changed in theocw-hugo-themes
repository. You can view the changes here