Assalam Walaikum,

Today i checked logs and i found a error so i tried to generate that error myself and when i clicked on chapters to reorder it generates the following error in in 3.0

Unknown column 'chapter_number_tr' in 'order clause' query: SELECT c.number AS chapter_number, c.title AS chapter_title, c_tr.title AS chapter_title_tr, chapter_summary.number_of_verses FROM ( SELECT v.chapter_number, COUNT(*) AS number_of_verses FROM quran_verses_ar AS v GROUP BY v.chapter_number ) AS chapter_summary LEFT JOIN quran_chapters_ar AS c ON chapter_summary.chapter_number = c.number LEFT JOIN quran_chapters_en AS c_tr ON c.number = c_tr.number ORDER BY chapter_number_tr ASC LIMIT 0, 10 in /home/***/modules/quran/quran.module on line 298.

so i just upgraded to 4.0 and when i clicked on quran following error appears without showing a single verse

    * user warning: Table '####.quran_verses_ar' doesn't exist query: SELECT COUNT(*) FROM ( SELECT v.chapter_number, COUNT(*) AS number_of_verses FROM quran_verses_ar AS v GROUP BY v.chapter_number ) AS chapter_summary LEFT JOIN quran_chapters_ar AS c ON chapter_summary.chapter_number = c.number LEFT JOIN quran_chapters_en AS c_tr ON c.number = c_tr.number in /home****modules/quran/quran.module on line 298.

    * user warning: Table '####.quran_verses_ar' doesn't exist query: SELECT c_tr.meaning AS chapter_meaning, c.number AS chapter_number, c.title AS chapter_title, c_tr.title AS chapter_title_tr, chapter_summary.number_of_verses FROM ( SELECT v.chapter_number, COUNT(*) AS number_of_verses FROM quran_verses_ar AS v GROUP BY v.chapter_number ) AS chapter_summary LEFT JOIN quran_chapters_ar AS c ON chapter_summary.chapter_number = c.number LEFT JOIN quran_chapters_en AS c_tr ON c.number = c_tr.number ORDER BY chapter_number ASC LIMIT 0, 10 in /home/***/modules/quran/quran.module on line 298.

Comments

Arshad Vayani’s picture

okay i just reinstalled quran module 4.0 but still i am getting the same problem when i click on chapter it gives me the same error as i mentioned above!

ichsan’s picture

'Alaikumsalam. Did you install the database files? They should be installed separately from database directory.

Arshad Vayani’s picture

yes i did i am still getting error when i click on chapter column

ichsan’s picture

Please re-import the sql files as suggested in the revised front page of Quran project. I hope it works.

amirudin’s picture

wa'alikumussalam

do you add some prefix when you first install your drupal database?
when i install my dupal on mysql database i add "drupal" prefix.
so before import quran-ar.mysql, i edit some line.
the default table that will be created is 'quran_chapters_ar'.
because my drupal database use prefix 'drupal' so instead of using table 'quran_chapters_ar' in the quran-ar.mysql i change it to 'drupalquran_chapters_ar'

you should change this to 'quran_verses_ar' too

i hope this helpfull

Arshad Vayani’s picture

No i haven't use any prefix. I really don't know why i am getting these errors.

ichsan’s picture

Are you sure that the Quran tables are already imported? From the log, it seems that the table is missing. Please check manually or use phpmyadmin to find out if the tables are already there. Or may be you have imported the Quran tables into wrong database?

Arshad Vayani’s picture

StatusFileSize
new39.1 KB
new35.59 KB
new35.25 KB
new35.1 KB
new57.03 KB

well yes i have correctly imported tables. Checkout screenshots i uploaded.

ichsan’s picture

From http://drupal.org/files/issues/sc3_0.png, it is clear that you don't use latest database tables. Please update the tables from the download page as I have specified in the front page

Arshad Vayani’s picture

well i have upgraded to latest version still i am getting this error.

Most important thing is that your demo site is also showing same error when i click on chapters

http://sancho21.co.cc/drupal/quran/index?sort=asc&order=Chapter

ichsan’s picture

Assigned: Unassigned » ichsan

Ok. Thanks you for the report. It is confirmed.

webprogrammer1’s picture

Version: 6.x-4.0 » 5.x-3.0
Priority: Critical » Normal

I was getting error (in v 1.2.4.1, drupal 5.x) when sorting by Chapter i.e. Chapter Name, so I changed chapter_number_tr to chapter_title_tr in the module (line # 300). It is working fine now.
http://www.baitulmukarram.net/quran/index

hassan2’s picture

Status: Active » Closed (cannot reproduce)