Download & Extend

As I've lost the game a redirect goes to a page that doesn't exist Error 404

Project:Invaders
Version:6.x-1.3
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active

Issue Summary

The module was installed as the others in /sites/all/modules/

The first game starts well, after all my ships have been destroyed the page where I put the block disappears and the browser points at the folder
../invaders/win
The result is this one:

404 Not Found

The requested URL /invaders/win was not found on this server.

Where is the misconfiguration?

Thanks

Comments

#1

Category:bug report» support request

Did you created /invaders/win page?
It's accessible directly?
If not, put redirection page that exist.
I'm not sure if I understand the problem.

Probably it's not related to Invaders project, but to some misconfiguration of your pages?

#2

Where are the instruction, I mean the how to or to do page help for this module game?
Thanks

#3

There is no page help for this module.

Try following things:
- try clear your cache,
(admin performance)
to rebuild menu items

and check if you have still problem to access:
www.yoursite/invaders/win
or:
/cms/?q=invaders/win
in your case.

If you still don't have access, try to access it when logged as admin.
If you don't have access as admin, you have some problem try to clear the cache again (or clear it manually) or you have some problem with clearing your cache, so disable it temporary for testing.

If you have access to this page from admin, but not from user or anonymous, check proper permissions.

Try above steps and if still nothing work, please write what steps have you did and to which exactly page again are you redirected after lose.

#4

Maybe I should use:

?q=invaders/win

instead of

invaders/win

as it would mean people who don't use clean URL's can still have winners saved.

#5

I had thought to put the game Invaders as a block into the node#392 of my blog: www.suddovest.it/cms/?q=node/392
In every block you have the possibility with the 'Page specific visibility settings' option to check 'Show on only the listed pages.' So I did for the Invaders Block.
On my site Invaders block is seen only into the page called node/392, as a block embedded.
How can I transform the numbers of my nodes in names? I'm using the latest release of D6.9 (now is no longer the latest 'cause D6.10 was released)
And to answer to your first question I did not create the page invaders/win. What extension should it have? How can I create a page like that? Is it a blank page without suffix with a chmod 0777 or 0775 or 0755?
Thanks I appreciate your help very much

#6

Category:support request» bug report

skinhat: Ah, firstly I haven't seen that you have some hardcoded paths.
I thought that path is defined normally in menu hook, but I haven't seen from where it's called.
It true, it shouldn't be clean url, especially when somebody have different subdirectory as root (in this case /cms/, so /invaders/win is going somewhere else).
And there shouldn't be hardcoded html tags without able to theme it.
You should use theme_form to make a proper form in Drupal way which will generate all proper paths.
In example:

<?php
$output
.= drupal_get_form('invaders_win_form');
?>

Where invaders_win_form should be a function which contain this form.
http://api.drupal.org/api/group/form_api/6

Look in functions: forum_form_main, user_filter_form for some examples.
So in my opinion the whole block hook should be rewrited without html tags and form retrieved using drupal_get_form.

#7

ftag:
For temporary fix find the following line in invaders.module:

<?php
    $content
.='<form id=\'invaders_winform\' method=\'POST\' action=\'/invaders/win\' > ';
?>

and delete first slash before invaders/win path from it like:
<?php
    $content
.='<form id=\'invaders_winform\' method=\'POST\' action=\'invaders/win\' > ';
?>

and check if it work.
And later code will be improved to be compatible with Drupal which are installed in non-root dir.

#8

The slash ! This was the problem! Now all works well! A special thank to kernob!

#9

Thanks Kenorb. I'll add this fix to next release.

#10

@kenorb Removing the slash does not fix the problem - I am using latest Drupal 6.13. and Invaders 6.x-1.4 [2009-Mar-03]

Did you created /invaders/win page?

How to create this page ? Do I create a page like node/88 and then path alias to invaders/win ?
Or something else ? Some help needed please.

#11

Put the game on a page directly after your website address. I.E.

yoursite.com/invaders

Don't put it on any deeper address or it won't show the "win" page.

You don't need to make a "win" page, it will be self generated.

Now all should work well.

nobody click here