Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-14-2008, 01:54 PM
webcosmo's Avatar
webcosmo webcosmo is offline
 
Join Date: Apr 2008
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 05-14-2008, 02:22 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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)
Reply With Quote
  #3  
Old 05-14-2008, 02:51 PM
webcosmo's Avatar
webcosmo webcosmo is offline
 
Join Date: Apr 2008
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #4  
Old 05-14-2008, 03:24 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by webcosmo View Post
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.
Reply With Quote
  #5  
Old 05-14-2008, 04:04 PM
webcosmo's Avatar
webcosmo webcosmo is offline
 
Join Date: Apr 2008
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #6  
Old 05-14-2008, 07:21 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 05-14-2008, 10:47 PM
webcosmo's Avatar
webcosmo webcosmo is offline
 
Join Date: Apr 2008
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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.
Reply With Quote
  #8  
Old 05-15-2008, 03:29 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:48 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.04008 seconds
  • Memory Usage 2,242KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete