Answers.Body: <p>After trying many different things I noticed that the background tasks que was backed up:</p>
  
  <p><a href="https://i.sstatic.net/Dhu9m.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Dhu9m.png" alt="Background Tasks - Resaving Entries"></a></p>
  
  <p>The queue was not moving. After a little research I came across the <a href="https://craftcms.com/support/stuck-tasks" rel="nofollow noreferrer">support ticket on craft on how to Resolve "Stuck" Background Tasks</a>. After completing the couple steps of updating the stuck task status and restarting the queue, they all cleared out.</p>
  
  <p>After this, my homepage was pulling in the entry properly and parsing the 'entry' variable without issue.</p>
  
  <p>My guess is that if you create an entry while the background tasks queue is stuck you will run into this issue.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-02-02T04:27:52.133Z
Answers.LastActivityDate: 2016-02-02T04:27:52.133Z
Answers.UserDisplayName: jooosh
Body: <p>I have an existing Craft Pro installation (v2.5.2757) that I'm using to drive an application.  The current install does not have a homepage or any entry associated with a URL. All requests are being handled by Dynamic Sites Routes (routes.php).</p>
  
  <p>The site has been running without issue for months with edits being made to entries and content being updated in the application.</p>
  
  <p>However, when I went to create a homepage for the site, I would receive the following error when the site loaded:</p>
  
  <p><a href="https://i.sstatic.net/2a4aF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/2a4aF.png" alt="Template Error - Variable &quot;entry&quot; does not exist"></a></p>
  
  <p>I confirmed that the 'This is for the homepage' was checked and that the correct 'Entry Template' was entered. I suspected that something in routes.php was causing the issue, but cleared that out and still received the error.  I tried clearing the caches as well but no luck.</p>
  
  <p>After multiple hours of troubleshooting I'm at a loss.</p>
  
Tags: <entry><tasks>
Title: Error: Variable 'entry' does not exist - When adding homepage or other entry with URL
ThreadText: # Error: Variable 'entry' does not exist - When adding homepage or other entry with URL
  
  (Asked by: username_0 on 2016-02-02)
  
  I have an existing Craft Pro installation (v2.5.2757) that I'm using to drive an application. The current install does not have a homepage or any entry associated with a URL. All requests are being handled by Dynamic Sites Routes (routes.php).
  
  The site has been running without issue for months with edits being made to entries and content being updated in the application.
  
  However, when I went to create a homepage for the site, I would receive the following error when the site loaded:
  
  [![Template Error - Variable "entry" does not exist](https://i.sstatic.net/2a4aF.png)](https://i.sstatic.net/2a4aF.png)
  
  I confirmed that the 'This is for the homepage' was checked and that the correct 'Entry Template' was entered. I suspected that something in routes.php was causing the issue, but cleared that out and still received the error. I tried clearing the caches as well but no luck.
  
  After multiple hours of troubleshooting I'm at a loss.
  
  **Tags:** entry, tasks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-02-02. Score: 2 | Accepted answer
  
  After trying many different things I noticed that the background tasks que was backed up:
  
  [![Background Tasks - Resaving Entries](https://i.sstatic.net/Dhu9m.png)](https://i.sstatic.net/Dhu9m.png)
  
  The queue was not moving. After a little research I came across the [support ticket on craft on how to Resolve "Stuck" Background Tasks](https://craftcms.com/support/stuck-tasks). After completing the couple steps of updating the stuck task status and restarting the queue, they all cleared out.
  
  After this, my homepage was pulling in the entry properly and parsing the 'entry' variable without issue.
  
  My guess is that if you create an entry while the background tasks queue is stuck you will run into this issue.
  
  
  ---
  
  