Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Page not refreshing when coming from another page.
  • Hi there,

    I have a strange issue on my FuelPHP app. 
    I have a Page A which redirect me on an other page (page B) where i can edit a record from my DB. When i submit the form, DB is updated and i stay on the same Page B with a flash message. It's ok it works fine :)

    I also have a "Leave" button to come back to Page A, see code below :

    <a href="<?php echo Router::get('lister_news', array() ); ?>" title="Retour"><span class="btn btn-primary">Quitter</span></a>


    When i click on this link, the link works but it's like i got redirected back on PAGE A, datas are not refreshed... I have to hit F5 to see any change :(

    If it can help, i also saw today an old flash message... I've checked and flash_auto_expire is set to true.

    I don't know what to do, maybe i've missed somthing on my route config ?

    Thank's for any help,
    Paul-H


  • HarroHarro
    Accepted Answer
    On localhost? Sounds like you have a caching issue somewhere.

    It is not supposed to do this, and flash messages should expire on next request, so they can not be kept and suddenly pop up.
  • Hello,

    I'm not on localhost, i'm on production server :( Cache is set to false, i'm gonna check if the cache folder is full.

    Paul-H
  • HarroHarro
    Accepted Answer
    And no caching proxy in the path (local or from your ISP). Or maybe the production webserver has very agressive caching headers, so the browser caches stuff it shouldn't?

    Even a browser cache should not show an old page on a redirect, redirects are new URL requests.
  • I'm looking in this direction, the app is behind a first public website which uses APC and Gzip... I still don't understand why when i click on a link i have old datas and when i press F5 i got fresh datas :(
  • HarroHarro
    Accepted Answer
    Do you have the same behaviour in different browsers? And on different PC's?
  • same behaviour...

    It's getting weider and weirder, if i test the route news/liste i got old values. If i test the route news/liste/ i get semi news values. Even weirder, on firefox i can't access the route, i got redirected on main page every time... 

  • HarroHarro
    Accepted Answer
    hmm... sounds like you have a challenge on your hands...

    You say "/new/liste" and "/news/liste/" produce different results? If so, then it's definitely something outside the applications control, as Fuel strips the trailing slash, so for Fuel both are the same.

    I suggest you get an HTTP request analyzer running (firebug, http-headers plugin, even wireshark), and check which requests go out to the server, what comes back, and what are the HTTP headers of the request and responses...
  • Something new, on Firefox i can not even access the page...

    I get this error message on firefox console... 
    --
    [11:46:43,015] GET http://adminv2.nintendo-difference.com/public/index.php/[object Object] [HTTP/1.1 404 Not Found 138ms]

    I keep on searching...
  • HarroHarro
    Accepted Answer
    What is [object Object], and why is that logged as part of the URL?

    That link works fine here btw, and redirects to the login page.
  • Problem solved.

    I don't know exactly why but here is the context of the app (I should maybe have started with this...)

    My Fuel App was in a subfolder of a Zend application, i mouved the entire folder of my Fuel app to a distinct place and it's now working fine :)

    Thank's for help guys :)

    Paul-H
  • Glad you've got it sorted.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion