I am running a recently downloaded clean installation of Drupal 6.6 core. I added the Advanced_Help to that core distro. I then added views. When I tried to add both viewsUI and Views Exporter, I now get the following error on all (yes all) pages: Fatal error: Cannot redeclare views_ui_list_views() (previously declared in ./sites/all/modules/views/includes/admin.inc:11) in ./sites/all/modules/views//includes/admin.inc on line 19.

This error seems to be platform independent, as I have tried it using a machine running OSX, another running XP and another running Linux.

CommentFileSizeAuthor
#7 windows_path.txt1.12 KBkjl

Comments

merlinofchaos’s picture

My guess is that the file admin.inc is corrupted; there is no declaration of views_ui_list_views() on line 19 of that file. This is the kind of thing I see with the occasional bad ftp transfer or untarring. You should probably download a fresh copy of the package and try again.

drewish’s picture

i'd also advise deleting all of the existing views files incase you've got some old files kicking around.

donalfitz’s picture

Thanks so much for the prompt replies. I just did the following:

1. dropped the drupal database;
2. recreated it, and assigned all permissions as per the install guides.
3. downloaded a new tarbal of both drupal and views;
4 installed drupal;
5. enabled views, Views exporter and views UI. (so these are the only modifications I've made to the core install)
6 Crashed it again :-)

Could it be some config issue on the server? If so I'm up the creek as I've no control over it.

Cheers,

Dónal

donalfitz’s picture

Sorry to be a nuisance guys, but this one becomes stranger. I have managed to get the views module working on a local install on my laptop. However, when I follow exactly the same procedure on the server, I get the error which forms the title for this thread. I'm possibly doing something incredibly dumb, but I'm a relative novice when it comes to the Drupal platform.

Sincere thanks for any help,

Dónal

donalfitz’s picture

Priority: Critical » Normal

Ok having traded ideas with people in the forums (or fora) The fix for this is simple enough. Basically the problem seems to be that some Linux servers are misinterpreting leading "/" characters in paths to admin.inc.

I simply wnt through the file and removed all leading "/" characters before "includes/admin.inc" and it worked fine. Seems to work on my xp install as well.

Hope this helps anyone who encounters the same thing.

kjl’s picture

Version: 6.x-2.1 » 6.x-2.x-dev
Status: Active » Needs review

a double '/' was breaking the file includein multiple spots. Here's a patch against head.

kjl’s picture

StatusFileSize
new1.12 KB

here's the patch

kjl’s picture

Title: Fatal error on install. » Fatal error: Cannot redeclare views_ui_list_views - bad paths in views_ui.module

Renaming to make searchable

ramuchidambaram’s picture

Even i am getting this error. How to fix it? Any Patch. I am struck.

dawehner’s picture

Status: Needs review » Fixed

this is fixed in 6-2.3

Status: Fixed » Closed (fixed)

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