1

I am trying to activate the View Mode Page module because I need to use URLs to jump from one view mode to another. From teaser to presentation to full node. Every time I try to activate the View Mode Page it gives me an error and after that I am unable to view the Manage Display section for any of my content types. It mentions there is an error in the view_mode_page.module (or something similar). Does anyone know if this module is incompatible with some other modules or what the problem might be?

Thanks in advance.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drp_obdcbn7hei.view_mode_page' doesn't exist:

SELECT view_mode_page.* FROM {view_mode_page} view_mode_page WHERE (content_type = :db_condition_placeholder_0) AND (view_mode = :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => tu_mooc [:db_condition_placeholder_1] => default )

en view_mode_page_get_patterns() (línea 281 de /hermes/waloraweb021/b1678/moo.blasbray/sites/all/modules/view_mode_page/view_mo‌de_page.module).

1

1 Answer 1

1

I don't know about the View Mode Page module specifically, but here's how you can find out yourself.

  1. Check the issue queue for the module. You can find a link to "all issues" on the module's project page (in this case, here). In this case, there aren't many issues; if there were a lot, you can use the search function. If searching, make sure to set the status to all issues, not just open issues, as if you're lucky your issue will already have been reported and fixed.

  2. If step 1 doesn't solve the problem, create a fresh install of Drupal 7 on your local machine or another server and install the Views Mode Page module and its dependencies. Make sure it works properly by itself when you have no other modules enabled. (For a small module like View Mode Page which has less than a few hundred installs, this step is especially important; for an extremely common module like Views itself, you can assume that someone has already done this and it's your problem.)

  3. If step 2 doesn't solve the problem, you'll need to start disabling the modules on your site one by one. Of course, don't do this on your live site-- do it on a backup site. Just guess which module might be causing the problem, disable it, and then clear the cache. Then try to enable Views Mode Page. If it doesn't work, choose another module to disable and repeat.

Yes, this is really painful and frustrating, but sometimes it is necessary if a search of the issue queues on drupal.org doesn't turn up anything. If you do have to do this and find the source of the problem, please don't forget to create an issue on drupal.org and report what you found!

3
  • I have made a fresh install of Drupal 7 and the first module I have installed is View Mode Page. When I try to enable the module I get the following error:
    – user12951
    Jan 28, 2013 at 11:55
  • PDOException: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes: CREATE TABLE {view_mode_page} ( content_type VARCHAR(55) NOT NULL, view_mode VARCHAR(55) NOT NULL, url_pattern VARCHAR(255) NOT NULL, show_title INT DEFAULT 0, title VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY (content_type, view_mode, url_pattern) ) ENGINE = InnoDB DEFAULT CHARACTER SET utf8; Array ( ) in db_create_table() (line 2688 of /hermes/waloraweb021/b1678/moo.blasbray/mimooc.com/includes/database/database.inc).
    – user12951
    Jan 28, 2013 at 12:00
  • Ok, then something is wrong with the module. It looks like you have the same problem as this issue here: drupal.org/node/1872382 I would log in to Drupal.org and add as much information as you can (Drupal version, server type, etc.) as a reply to that thread; the module maintainer may be able to help you. Jan 28, 2013 at 12:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.