Panopoly should be moving to using the Migrate module to handle demo content. Changes this will need to be echoed for panopoly_faq too. See #2105503: Implement demo content via Migrate instead of defaultcontent for details. Most of the original discussion is in #1869972: Implement Migrate Module for Panopoly Demo Content

Comments

mrfelton’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new769.94 KB
mrfelton’s picture

StatusFileSize
new769.98 KB

Fix for code style issues

markwk’s picture

Thanks, mrfelton. I'll check on this patch soon. I appreciate your help.

mrfelton’s picture

Assigned: Unassigned » mrfelton
Category: Feature request » Task
Issue summary: View changes
mrfelton’s picture

StatusFileSize
new1.46 MB

Updated patch includes binary files properly, and an update hook for users upgrading from an older version which reimports the updated demo content.

dsnopek’s picture

Are we working on the 1.x or 2.x version of Panopoly FAQ? 2.x is the only one with a download on the Drupal.org page.

dsnopek’s picture

Status: Needs review » Needs work

Ok, so to answer my own question based on your patch - we're working on 1.x! So, I guess this will need to be ported to 2.x later.

I tested and enabling it on a new site works great! However, the upgrade doesn't work because the module is renamed from "panopoly_faq_democontent" to "panopoly_faq_demo" and so the panopoly_faq_demo_update_7001() function will never run.

We either need to:

  1. Keep the module name the same, or
  2. Run the upgrade in hook_install
  3. Or keep a stub version of "panopoly_faq_democontent" around, which has an update function that (a) removes the old demo content, (b) enables "panopoly_faq_demo" and (c) disables itself

I think that #3 is probably the cleanest solution! We can set hidden = TRUE in the .info file so that users won't even know the stub module is there.

What do you think?

mrfelton’s picture

Status: Needs work » Needs review
StatusFileSize
new1.46 MB

Updated the enable/disable/update hooks to use new helper function from panopoly_core to handle creating and removing default content in a standard way. Also, only deletes old demo content if it hasn't been edited.

Re #7 - I went with option 3)

http://drupalcode.org/project/panopoly_faq.git/commitdiff/15b1fd7?hp=86f...

mrfelton’s picture

mrfelton’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.