Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittently, urls in cache are parsed incorrectly. #2

Closed
timkelty opened this issue Sep 18, 2014 · 6 comments
Closed

Intermittently, urls in cache are parsed incorrectly. #2

timkelty opened this issue Sep 18, 2014 · 6 comments

Comments

@timkelty
Copy link

Experiencing a weird issue...not sure if it's Craft or your plugin, but I've only noticed it when clearing cache via cache-clear.

So every once in a while (I've seen it twice now), entry URLs in the output get messed up.
I've seen them output in 2 ways:

  • /index.php/mypage/
  • /index.php/?p=mypage

Now of course, both of those work, but they shouldn't be outputting like that. Once they get cached like that, clearing via clear-cache doesn't seem to help. However, if I clear in the control panel, all is fixed.

Again - this doesn't happen all the time, and I'm not sure what triggers it. I've cleared the cache several times via the cache-clear url and the urls look fine.

Any ideas?

@jasonmccallister
Copy link
Owner

Hey Tim,

How are you calling the URL in the Craft templates? Are you using {{ siteUrl }}?

Also are you on the latest version of Craft?

@timkelty
Copy link
Author

When I saw it break, I was on 2.2.2582, which was current at the time.
I upgraded to 2.2.2586 today, however.

The urls I'm calling are in entries loops, so just {{ entry.url }}.

@timkelty
Copy link
Author

Posted here as well: http://craftcms.stackexchange.com/questions/2615/craft-urls-intermittently-being-cached-as-index-php-my-page-or-index-phpp-my

I'll try as brad suggested, setting 'omitScriptNameInUrls' => true

@jasonmccallister
Copy link
Owner

Sorry to take so long and circle back to this, I read the stack exchange thread. Is this still an issue?

@timkelty
Copy link
Author

As long as I use omitScriptNameInUrls, I've had no problems.

@jasonmccallister
Copy link
Owner

Thanks, I will close this out ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants