quran / quran.com-frontend-v2

https://quran.com
GNU General Public License v3.0
454 stars 199 forks source link

[Bug] Quick link 'Ayatul Kursi' from the homepage causes internal server error. #160

Closed mubaarakhassan closed 4 years ago

mubaarakhassan commented 4 years ago

Description

Regarding link to 'ayat al kursi' the page navigates to https://quran.com/ayatul-kursi , which causes an internal server error. It looks like the redirect somewhere in ruby (or in the database) has an invalid link. Selecting other links causes no issue.

Steps to Reproduce

  1. Go to quran.com
  2. Select 'ayat al kursi' from the quick links

Intended Use Case

Suppose a button click somewhere and redirect to a correct page.

Basic Information

Browser: Chrome OS: Windows

mubaarakhassan commented 4 years ago

Looking at the code. I think i found the problem. Meta_url could be changed with 'https://quran.com/2/255'

class AyatulKursiPresenter < ChapterPresenter
  def meta_url
    'https://quran.com/ayatul-kursi'
  end

  def meta_title
    "Ayatul Kursi - Surah #{chapter.name_simple} 2:255"
  end

  def meta_keywords
    ['آیت الکرسی', 'ayatul kursi', 'Quran 2:255']
  end
end

Excuse me if i'm wrong. Definitely not a ruby developer. If i find the time, I will try and look if i can clone the project and make it work.

ahmedre commented 4 years ago

this actually works in the beta - beta.quran.com - once it's launched then in sha' Allah the link will work again