Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#357 closed bug (fixed)

avoid redirect for not-found image urls - workaround

Reported by: lemon-head Owned by:
Priority: minor Milestone: 0.1.2.1
Component: FrameWork Keywords:
Cc:

Description

Currently it happens that we have images with 'src="file_not_found"'. This image uri is generated in MOD_layoutbits, when a thumbnail is not found.

Problem:

  1. the image request is redirected to /main/, because it is not found
  2. the redirected request writes on session variables, such as $_SESSIONlastRequest?.
  3. after that, a language switch will redirect to mainpage, instead of the page you were viewing.

Solution (for now):

  • instead of "file_not_found", use empty uri strings for the image, as they will (hopefully) not be redirected anywhere.

Solution (long-term):

  • see also #350
  • change the rewrite rule, so images, javascript etc are not redirected to mainpage
  • find another solution for the language switch, that does not use PRequest::back()
  • this can go in a new ticket - this one is for the temporary solution described above.

Change History (10)

comment:1 Changed 11 years ago by lemon-head

  • Owner set to lemon-head
  • Status changed from new to assigned

comment:2 Changed 11 years ago by lemon-head

I will take care of this.

comment:3 Changed 11 years ago by lemon-head

That's not really the solution, I found.

Better: To get around the nasty rewrite rule, return 'bw/' instead of just .

comment:4 Changed 11 years ago by lemon-head

  • follow_up changed from none to test
  • Summary changed from avoid not-found non-empty image urls to avoid redirect for not-found image urls - workaround

should be fixed with [3803]

For testing it is better to use a local install, where some images are actually missing!

The page to test would be mainpage and forum thread - that's where you find avatars.

comment:5 Changed 11 years ago by lemon-head

  • Component changed from BW General to FrameWork
  • follow_up changed from test to none
  • Milestone 0.1.2.1 release with MOD_words + MOD_layoutbits + TinyMCE update deleted
  • Owner lemon-head deleted
  • Priority changed from major to minor
  • Status changed from assigned to new
  • version changed from alpha to all

The main problem (language switch) is solved with [3803].

However, I imagine it cost some performance if not-found images are sent to htdocs/index.php. Maybe we keep this in mind to look into another time. (evtl changing the rewrite rule)

comment:6 Changed 11 years ago by lemon-head

  • follow_up changed from none to test
  • Milestone set to 0.1.2.1 release with MOD_words + MOD_layoutbits + TinyMCE update

oops.. this was really a bit of misinformation! Unfortunately I cannot edit.

so, to clarify:

  1. the main problem is solved thanks to the new language switcher [3823], not the workaround from [3803].
  2. the language switcher will go to alpha and production with other tickets already
  3. the [3803] workaround should also go to alpha and production, because it does still improve the situation a bit.

So, back into the milestone!

Later, we should reopen the ticket or file a new one, to find a better solution (change rewrite rule?)

comment:7 Changed 11 years ago by lemon-head

  • follow_up changed from test to move to alpha

the workaround seems to work - so, send

trunk/modules/layoutbits/lib/layoutbits.lib.php

to alpha!

comment:8 Changed 11 years ago by lemon-head

  • follow_up changed from move to alpha to test on alpha

moved to alpha with [3866]. please test.

more precise: just test if the images don't break.

comment:9 Changed 11 years ago by philipp

  • follow_up changed from test on alpha to release
  • Resolution set to fixed
  • Status changed from new to closed

comment:10 Changed 11 years ago by matrixpoint

  • follow_up changed from release to none
Note: See TracTickets for help on using tickets.