1

I'm trying to create a copy of a live site and use it as a test site, but am having trouble with views. There's a view whose settings are in the database but don't show up correctly in the views UI.

I copied the site by (1) installing Drupal, (2) installing the required modules, including some custom features, and (3) exporting the database from the live site and importing to the test site.

The view in question is defined in a feature, and also exists in the views_view and views_display tables in the database. I have not reverted the feature, so I believe the feature code should be ignored in favor of whatever is in the database.

In any case, both in the database and in the feature, the view has an added display with some settings that override the default display. For example, the added display has Header: PHP Code, which overrides the default display's Header: None. In the views UI, the added display exists, but, except for Name, all of its overridden settings, relationships, arguments, fields, and filters are gone. That's also the case for some of the other displays on the view. One display lost its relationships, arguments, and sort criteria, but not its fields and filters.

I've tried clearing all caches (drush cc all), clearing the views cache (Admin > Site Building > Views > Tools), and deleting all rows from the views_object_cache table. Didn't help.

0

FWIW - you might want to install drush and use the drush archive-dump command which will extract your entire site (database, drupal instance and files) into a single tarball file. You can then use drush archive-restore to import that site into a different site on the same or different machine.

There are other ways, of course, but this seems to be one of the easiest as there is nothing to remember or think about other than doing it.

Good luck - B

0

Memcache seems like a possible cuplrit. Try clearing out memcache cache manually. Drupal generally dislikes DB edit's and may not understand to requery the actual DB, but instead is getting the values from Memcache.

/etc/init.d/memcached restart

  • 1
    Pretty sure memcached isn't running. This is on MAMP and I haven't enabled memcached in php.ini, and there's no memcached process running on my system. – user5072 Mar 30 '12 at 17:28
0

The problem turned out to be permissions.

The live site was running on a 64-bit system, and the test site was running on a 32-bit system. That ended up seriously messing up the admin permissions on the test site because role_export didn't support 32-bit systems. Once I fixed the permissions (by upgrading MAMP to a 64-bit version), the views worked as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy