Pressing Close link leads to blank page

yngens - August 21, 2007 - 10:13
Project:Admin message
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Pressing Close link leads to blank page (admin_message/close/6437) and it just does not return.

#1

fajerstarter - August 21, 2007 - 11:45

Do you have javascript turned on?

#2

yngens - August 23, 2007 - 07:20

sure, i do

#3

yngens - August 23, 2007 - 07:24

probably it conflicts with some other module. but i have long list of modules. i will try to identify by switching them off one by one.

#4

fajerstarter - August 25, 2007 - 19:13

Did you find out what was causing it?

#5

yngens - August 27, 2007 - 02:47

I could not find. And that's why I decided not to use this module for now.
Why at all it needs to go admin_message/close/nid? Can it be closed somehow (using javascript) at the same page without redirecting?

#6

fajerstarter - August 27, 2007 - 07:37
Status:active» active (needs more info)

That's the thing, it IS closed with JavaScript, that's why I asked you if you had it turned on. I would try it with a different browser, look for JavaScript errors, turn off other modules and a last try to install it on a newly installed drupal 5.2.

#7

yngens - June 25, 2008 - 22:40

I closed all the modules and tried admin message module. Alas, it still redirects to a blank page.

#8

fajerstarter - August 29, 2007 - 16:22

Browser, browser version, operation system? Did you try a different browser? Any js errors logged (they are displayed differently depending on the browser you use)? I need more than just, "it isn't working" - It's working here. Demopage?

#9

yngens - August 30, 2007 - 01:28

I tested with new install and it works. I do not know why it does not work on my site. Probably it gets into conflict with one of custom modifications. Tested in Firefox/2.0.0.6 and IE 7.0.57.x.x. Unix. I will try to figure out and if I find something I will post it here.

There is no demopage, this is happening on a production site. I can send you a link if you want to take a look.

#10

fajerstarter - August 30, 2007 - 08:27
Status:active (needs more info)» fixed

Well, if it's works on a new installation with the same browser that's enough for me, so marking as fixed. Of course, if you find out what the initial problem was, and especially if it can be dealt with in this module, post it here.

#11

Anonymous - September 13, 2007 - 08:31
Status:fixed» closed

#12

thulstrup - December 29, 2007 - 15:08
Status:closed» active

I had the same problem.

I noticed that my admin block didn't have the id '#block-admin_message-admin_message'. So the line $("#block-admin_message-admin_message a.close") didn't find any elements.

The solution for me, was to tell jQuery to look for a different block id.

Perhapse a better solution would be to look for something like $('a.admin-message-close') instead?

Another thing:
Shouldn't the close page redirect users without JavaScript back to the page from where they came, instead of just showing a blank page?

#13

fajerstarter - January 5, 2008 - 11:41

what ID did that block have? (I didn't know they could be different).

And yes, non-js useres should be redirected to another page or have the page refreshed, but that's a seperate issue. I've been to lazy to fix that (patches welcomed :) )

#14

pjek - February 26, 2008 - 04:40

I have the same issue on Drupal 5.7. in addition to that anonymous users get a 403.

#15

fajerstarter - February 26, 2008 - 10:39
Status:active» active (needs more info)

Sorry, I need more info here. Why does the js fail? Any errors? What HTML ID does the block have?

And this module *does not* work for anonymous users, and is not meant to do.

#16

pjek - February 27, 2008 - 01:00

I am very sorry. First I did not read the introduction on the project page correctly. Because it states that it is not supposed to work for anonymous users. Secondly, I am actually glad it doesn't work for them, that way each anonymous gets to see the message!!

Now on my problem, it seems that the js fails. 2 things happen here

  1. when an anonymous user clicks close they get redirected to a 403 access denied page
  2. when an authorized users clicks close the get redirected to a 100% blank (white) page, in the adressbar I can read http://example.com/admin_message/close/306

I do not know why the js fails, if you could help me telling me where to look far the answer I can definitely tell you that. Same goes for the HTML ID, where do I find it?

#17

yngens - May 23, 2008 - 04:38

#12 says "The solution for me, was to tell jQuery to look for a different block id." how exactly i can do the same? the problem still persists on another site with another theme.

#18

yngens - June 25, 2008 - 22:44

any update on resolving this issue?

#19

thulstrup - June 26, 2008 - 07:10

@fajerstarter: I've changed the id's of my blocks simply by using a block template. I did this because I wanted more meaningful block id's.

So instead of: #block-block-1
I might have: #block-latest-news

The problem is that the module is looking for a specific block id:
$("#block-admin_message-admin_message a.close").click(function() { (from admin_message.js)
But my block isn't named #block-admin_message-admin_message, it's name something else.

My suggestion is to give the close link a unique id so we can do something like:
$("a#admin_message-close").click(function() {

#20

yngens - June 26, 2008 - 23:25

I have 'block-admin_message-admin_message' for the modules block id, but the messages don't close anyway. Please someone offer a patch. Suggestion do not help for non-coders.

This module offers such a good feature, but it is a big pity it does not work properly.

#21

yngens - July 2, 2008 - 19:46

Ok, probably someone wıll be interested to solve this for modest 30 USD chip in?

#22

yngens - July 29, 2008 - 01:43

I am raising my bounty to 50 USD.

#23

fajerstarter - August 1, 2008 - 16:31

@thulstrup: I agree that the name of the block ID is far from beautiful. But on the other hand I think that scripts should be able to use the ID of an elements. Traversing the DOM by ID is the fastest way of getting an element. You should be able to exclude the block ID from being renamed or even override the JavaScrip-file with a custom one.

@yngens: If the ID is not the problem I'm not sure what's causing it. Do you have an example site?

#24

yngens - August 3, 2008 - 08:17

fajerstarter, yes please register on http://blog.kyrgyz.us i will post a new admin message for new users there.

#25

fajerstarter - August 3, 2008 - 08:44

The script is not even added to the page...

Look for <script type="text/javascript" src="/drupal-5-0/sites/localhost/modules/admin_message/admin_message.js"></script> in the header. it should be there when the block is rendered. As mentioned earlier I would start with disabling modules and the custom theme.

#26

yngens - August 3, 2008 - 10:28

fajerstarte, this is fresh install of drupal: http://getnick.com with only core-required modules. close link anyway leads to empty page :(

#27

fajerstarter - August 3, 2008 - 13:45

I also see now that the css-file isn't added as well, so something fishy is going on. Those files (JS and CSS) are added at row 118 in admin_message.module, so start debugging there.

#28

yngens - August 3, 2008 - 16:08

i will try to look into it, but unfortunately i am not a coder and i doubt i will dig something out. have you tried your module on a fresh install?

#29

fajerstarter - August 3, 2008 - 17:09
Status:active (needs more info)» won't fix

Sure I have. I'm marking this as won't fix since I can't reproduce this. Feel free re-open if you find something.

#30

urix - October 29, 2008 - 12:35

I have the same thing... blank screen of death :(
My bad, everything works OK :)

#31

fajerstarter - November 26, 2008 - 08:09
Status:won't fix» closed
 
 

Drupal is a registered trademark of Dries Buytaert.