https://redmine.gc.cuny.edu/https://redmine.gc.cuny.edu/favicon.ico2014-05-02T13:36:37ZCUNY Graduate Center - Project Tracking SystemCUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=153202014-05-02T13:36:37ZBoone Gorgesboone@gorg.es
<ul><li><strong>Tracker</strong> changed from <i>Bug</i> to <i>Feature</i></li></ul> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=153332014-05-02T17:00:45ZRaymond Hoh
<ul></ul><blockquote>
<p>- Ensure that our bbPress 1.x-2.x migration keeps track of old post IDs, so we have the necessary data to do the migration (Ray, maybe you know off the top of your head whether this is the case)?</p>
</blockquote>
<p>bbPress 2 is smart enough during conversion to record a new post meta entry called <code>'_bbp_post_id'</code> for forum replies and <code>'_bbp_old_topic_id'</code> for forum topics, which references bbPress 1's post IDs. These can then be used by a migration script to do their thang.</p>
<hr />
<p>You might want to take a look at <a href="https://github.com/hwdsbcommons/u-bp-forum-attachment-migration" class="external">a similar plugin</a> I wrote to migrate attachments from u BP Forum Attachments to bbPress 2. I didn't copy the attachments over to WordPress or a bbPress forum attachment plugin because at the time, we didn't decide whether GD was good enough.</p>
<p>In particular, the migration and admin tool code should be handy to look at.</p> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=156202014-06-10T18:55:42ZBoone Gorgesboone@gorg.es
<ul></ul><p>Thanks for linking to your repo, Ray - it was a helpful data point.</p>
<p><a class="external" href="https://github.com/castiron/cac/commit/e59be24140493a9700c2b4511530dd0b8f4280f9">https://github.com/castiron/cac/commit/e59be24140493a9700c2b4511530dd0b8f4280f9</a> contains the following:</p>
<p>- the GD bbPress Attachments plugin<br />- my cac-bbpress-attachments-bridge plugin, which contains a migrator as well as a backward compatibility fix for old URLs<br />- a change to .htaccess that allows us to remove forum-attachments-for-buddypress</p>
<p>I'll deploy to cdev for testing as soon as it's back up.</p> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=166342014-09-19T01:22:20ZBoone Gorgesboone@gorg.es
<ul></ul><p>I've run the migration on cdev, and it's gone fine. See eg <a class="external" href="http://cdev.gc.cuny.edu/groups/cac-community-team-project-planning/forum/topic/commonsinabox-org-homepage/">http://cdev.gc.cuny.edu/groups/cac-community-team-project-planning/forum/topic/commonsinabox-org-homepage/</a> (never mind the dupe on the top post - I messed up the migration the first time I ran it)</p>
<p>I've realized in testing that there's no access protection in place. See <a class="external" href="http://cdev.gc.cuny.edu/files/CBOX-Homepage-v2.1.png">http://cdev.gc.cuny.edu/files/CBOX-Homepage-v2.1.png</a>. I'll probably do something fairly quick and dirty for this rev - maybe direct all requests to <a class="external" href="http://cdev.gc.cuny.edu/files/">http://cdev.gc.cuny.edu/files/</a>* in .htaccess and send them to a ms-files.php-type handler that does permissions checks. Ugh</p> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=166402014-09-19T17:49:49ZBoone Gorgesboone@gorg.es
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Resolved</i></li></ul><p>In <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/75c9456f620093f455d97fa6fd4e32498a48e48d">https://github.com/cuny-academic-commons/cac/commit/75c9456f620093f455d97fa6fd4e32498a48e48d</a> <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/d19ae9f59defc287079b97785b4e2b44c88465a0">https://github.com/cuny-academic-commons/cac/commit/d19ae9f59defc287079b97785b4e2b44c88465a0</a>, I divert file uploads through our own cac-files.php. I've tried to be as conservative as possible in terms of file routing: only disable SHORTINIT if looking at the "top-level" site (no subdomains); only protect files that are in private groups. But as you can see from the changeset, getting from a file attachment name to a definitive statement on permissions takes many steps.</p>
<p>I'm going to mark this as resolved, and we'll make sure to include some notes on the subject when we do team testing before release.</p> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=166422014-09-19T17:59:51ZBoone Gorgesboone@gorg.es
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Assigned</i></li><li><strong>Assignee</strong> changed from <i>Boone Gorges</i> to <i>Raymond Hoh</i></li></ul><p>Ray - One last note about this. GD was being kinda greedy about when it displayed its content, and was putting it into the bbp-live-preview AJAX request. I fixed it like this <a class="external" href="https://github.com/cuny-academic-commons/cac/commit/8c6bb7f1439f8a6e40d791064b367b07ca4f5e9a">https://github.com/cuny-academic-commons/cac/commit/8c6bb7f1439f8a6e40d791064b367b07ca4f5e9a</a>. I think it would probably be harmless to put this into the bbp-live-preview plugin (this is a fairly popular add-on, I think), but if not, maybe you could put a do_action() right there, so I can avoid touching the GD plugin. Let me know what you think, and I'll reclose this ticket.</p> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=166932014-09-22T20:55:47ZRaymond Hoh
<ul></ul><p>Thanks Boone! I've added your GD bbPress Attachment changes into the bbp-live-preview plugin.</p> CUNY Academic Commons - Feature #3189: Migrate forum attachments to bbPress 2.x / GD attachmentshttps://redmine.gc.cuny.edu/issues/3189?journal_id=166942014-09-22T20:59:50ZBoone Gorgesboone@gorg.es
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Resolved</i></li></ul><p>Cool! Marking resolved.</p>