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

URLs in theme mods and other options must be swapped on copy/clone #156

Closed
boonebgorges opened this issue Nov 6, 2018 · 3 comments

Comments

Projects
None yet
1 participant
@boonebgorges
Copy link
Member

commented Nov 6, 2018

The OpenLab package copies template sites in two different places: during user-facing cloning, and during template-site cloning. (Would be nice to consolidate.) In both places, options are copied over wholesale. This fails to account for the fact that options may contain URLs or upload paths, which are site specific, and so need search-and-replace applied to them. See:

https://github.com/cuny-academic-commons/cbox-openlab-core/blob/master/includes/group-sites.php#L1507
https://github.com/cuny-academic-commons/openlab-theme/blob/master/lib/course-clone.php#L546

I recently fixed this in a separate project like this: cuny-academic-commons/cac-site-templates@36e3853 Since the clone process here was largely pulled from OpenLab course cloning, it should be a pretty straightforward port back.

@boonebgorges boonebgorges added this to the 1.1.1 milestone Nov 6, 2018

@boonebgorges boonebgorges self-assigned this Nov 6, 2018

@boonebgorges

This comment has been minimized.

Copy link
Member Author

commented Jan 25, 2019

In the case of group-type templates, the problem is somewhat deeper: the attachment directory is not being copied over, which means that theme-related path swapouts (like for the header image) won't work even if the paths are correct. A fix is coming up for both.

@boonebgorges

This comment has been minimized.

boonebgorges added a commit to cuny-academic-commons/openlab-theme that referenced this issue Jan 29, 2019

@boonebgorges

This comment has been minimized.

Copy link
Member Author

commented Jan 29, 2019

This is now fixed in both places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.