vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Attachment Permission Denied (https://vborg.vbsupport.ru/showthread.php?t=179188)

webcosmo 05-14-2008 01:54 PM

Attachment Permission Denied
 
I am running into this error hoping somebody could suggest a solution. When a user uploads an attachment on a post we get error on clicking on the attachment link. Registered users has permission to view attachments.

The error is:
Exception... "'Permission denied to call method XMLHttpRequest.open' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no

As an example first post of this thread has an attachment (shows the phone icon, dont know why).
http://webcosmoforums.com/showthread.php?t=469
Clicking on it shows that error.

Lynne 05-14-2008 02:22 PM

I don't get an error when clicking on that. Have you tried this out as a guest vs registered user vs admin? And have you tried it in different browsers? (I'm using firefox on a Mac)

webcosmo 05-14-2008 02:51 PM

Quote:

Originally Posted by Lynne (Post 1519384)
I don't get an error when clicking on that. Have you tried this out as a guest vs registered user vs admin? And have you tried it in different browsers? (I'm using firefox on a Mac)

Thanks for helping.

When you clicked on the attachment was you able to see the larger view? That was the problem actually. Small thumb view is fine.

I tried Mozilla and IE on Windows. Both giving me permission denied error. It seem to be a JavaScript error, but you could tell better.

Lynne 05-14-2008 03:24 PM

Quote:

Originally Posted by webcosmo (Post 1519409)
Thanks for helping.

When you clicked on the attachment was you able to see the larger view? That was the problem actually. Small thumb view is fine.

I tried Mozilla and IE on Windows. Both giving me permission denied error. It seem to be a JavaScript error, but you could tell better.

When I clicked on it, it would not open. But, I was able to do a "Open in New Tab" to it. Have you looked at your source code to verify that the javascript is being called correctly? You have some sort of modification installed since it isn't standard vb.

webcosmo 05-14-2008 04:04 PM

Quote:

Originally Posted by Lynne (Post 1519453)
When I clicked on it, it would not open. But, I was able to do a "Open in New Tab" to it. Have you looked at your source code to verify that the javascript is being called correctly? You have some sort of modification installed since it isn't standard vb.

You right, I haven't noticed that. If you move the mouse on top of the thumb it shows the same url as on the new tab.
I am not much of a PHP literate, just got some idea. I work mainly with ASP .Net. If you could tell what part/file to change I would appreciate that.

Lynne 05-14-2008 07:21 PM

Just taking a quick look at your source code, I see that the image is called out in this manner:
HTML Code:

<div id="post_message_969">If a woman likes a man with whom she is talking at the moment, she raises the tone of her voice, that is, she starts talking  with higher voice, even not noticing this herself. A man who is interested in the woman, on the contrary, unwittingly lowers the tone of his voice in a conversation with her. That is he begins to speak with more low voice. <a href="http://www.webcosmoforums.com/attachment.php?attachmentid=1&amp;d=1210749451" rel="Lightbox" id="attachment1" ><img src="http://www.webcosmoforums.com/attachment.php?attachmentid=1&amp;thumb=1&amp;d=1210749451" class="thumbnail" border="0" alt="Click image for larger version

Name:    04100.jpg
Views:    4
Size:    1.6 KB
ID:    1"
style="margin: 2px" />
</a></div>
        <!-- / message -->

Notice that the alt text for the <img> tag is broken into several lines. That's a no-no and could be why it isn't working properly.

webcosmo 05-14-2008 10:47 PM

Quote:

Originally Posted by Lynne (Post 1519721)
Just taking a quick look at your source code, I see that the image is called out in this manner:
HTML Code:

<div id="post_message_969">If a woman likes a man with whom she is talking at the moment, she raises the tone of her voice, that is, she starts talking  with higher voice, even not noticing this herself. A man who is interested in the woman, on the contrary, unwittingly lowers the tone of his voice in a conversation with her. That is he begins to speak with more low voice. <a href="http://www.webcosmoforums.com/attachment.php?attachmentid=1&amp;d=1210749451" rel="Lightbox" id="attachment1" ><img src="http://www.webcosmoforums.com/attachment.php?attachmentid=1&amp;thumb=1&amp;d=1210749451" class="thumbnail" border="0" alt="Click image for larger version

Name:    04100.jpg
Views:    4
Size:    1.6 KB
ID:    1"
style="margin: 2px" />
</a></div>
        <!-- / message -->

Notice that the alt text for the <img> tag is broken into several lines. That's a no-no and could be why it isn't working properly.

That may be the case. I tried editing the alt attribute to empty string on the postbit-attachmentthumbnail. But seems like that has no impact on it.

Do you happen to know which part need to be modified to take off the alt tag?

Thanks for your help.

Lynne 05-15-2008 03:29 AM

Since you are using some sort of modification to do this, I really don't know. You'd have to ask in the modification thread.


All times are GMT. The time now is 04:58 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01088 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete