Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
  #1  
Old 01-31-2016, 07:20 PM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Unregistered user post

Could someone tell me if this is a bug?

As an admin, I am unable to edit the post of a guest.
All permissions have been made but still not able. . .

Thanks. . .
Reply With Quote
  #2  
Old 02-11-2016, 07:44 PM
BugOutGirl BugOutGirl is offline
 
Join Date: Feb 2015
Location: Canada
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's been going on a long time and I am getting quite frustrated with it.

Here is the bug report: http://tracker.vbulletin.com/browse/VBV-12765

I don't get the feeling they are doing anything about it, anytime soon.

--------------- Added [DATE]1455227399[/DATE] at [TIME]1455227399[/TIME] ---------------

Oh, and please be sure to vote as well for this issue! http://tracker.vbulletin.com/browse/VBV-12765
Reply With Quote
Благодарность от:
DemOnstar
  #3  
Old 02-12-2016, 01:49 AM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DemOnstar View Post
Could someone tell me if this is a bug?

As an admin, I am unable to edit the post of a guest.
All permissions have been made but still not able. . .

Thanks. . .
I edited node.php per the post in the JIRA and it works.

The file:
/core/vb/api/node.php

From the JIRA posted by Igor Arkadia

Code:
The file:
/core/vb/api/node.php

The method:
getCreatepermissionsForEdit()

You check there if nodeid, channelid, userid etc are not defined and do "return array('createpermissions' => false);" if it's like this. The problem is how you do it:

if ... OR empty($node['userid']) OR ...

Posts of guests have userid = 0, the function empty() in PHP returns true if its argument is equal to 0. I agree it could be unexpected behavior of the function but it is how it works.
I guess it could be patched changing this code to something like:

... OR (empty($node['userid']) && ($node['userid'] != 0)) OR ...
This guy already seems to have found the issue, it just hasn't been fixed yet.

Whether or not it has unexpected results is yet to be discovered.
Reply With Quote
2 благодарности(ей) от:
DemOnstar, MarkFL
  #4  
Old 02-12-2016, 08:46 AM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BugOutGirl View Post
It's been going on a long time and I am getting quite frustrated with it.

Here is the bug report: http://tracker.vbulletin.com/browse/VBV-12765

I don't get the feeling they are doing anything about it, anytime soon.
Now this is typical. This is what pisses me off.
A user provides a solution and nobody does anything about it for months on end. . .
There are many problems with un-registered and not logged on users.

1. Permissions don't work.
2. Attachments don't show up in quotes.
3. The option to change title from 'Guest' doesn't work.
4. When a guest makes a post, there is no acknowledgement shown. The screen just goes to the page not showing the post that has just been made. .

When one relies on unregistered or not logged on guests, it renders the site useless basically.
And then it becomes a recorded bug which lies there forever. . .

Quote:
Originally Posted by Replicant View Post

This guy already seems to have found the issue, it just hasn't been fixed yet.
As above . . .

By the way. . .

Quote:
Originally Posted by Replicant View Post
There is on the other hand a way to do it via SQL queries. I know you like to tinker, so if you want to investigate that, I'll point you in the right direction.
https://vborg.vbsupport.ru/showpost....95&postcount=4

Cheers. . .

--------------- Added [DATE]1455274599[/DATE] at [TIME]1455274599[/TIME] ---------------

Quote:
Originally Posted by Replicant View Post
I edited node.php per the post in the JIRA and it works.

The file:
/core/vb/api/node.php

From the JIRA posted by Igor Arkadia

Code:
The file:
/core/vb/api/node.php

The method:
getCreatepermissionsForEdit()

You check there if nodeid, channelid, userid etc are not defined and do "return array('createpermissions' => false);" if it's like this. The problem is how you do it:

if ... OR empty($node['userid']) OR ...

Posts of guests have userid = 0, the function empty() in PHP returns true if its argument is equal to 0. I agree it could be unexpected behavior of the function but it is how it works.
I guess it could be patched changing this code to something like:

... OR (empty($node['userid']) && ($node['userid'] != 0)) OR ...
This guy already seems to have found the issue, it just hasn't been fixed yet.

Whether or not it has unexpected results is yet to be discovered.
I have looked at node.php but as usual, can't make head nor tail of it. . .

Code:
	// This function is only meant to be called from the createcontent controller's actionLoadEditor()
		// It's not meant to be very versatile.
		if (!is_array($node)
			OR empty($node['nodeid']) OR empty($node['starter'])
			OR empty($node['channelid']) OR empty($node['userid'])
			OR empty($node['contenttypeid'])
		)
		{
			return array('createpermissions' => false);
		}

		// if the user can't edit this node, then we're out.
		if (!vB_Library_Content::getContentLib($node['contenttypeid'])->getCanEdit($node))
		{
			return array('createpermissions' => false);
		}
Should something be changed in this area?
Reply With Quote
  #5  
Old 02-12-2016, 12:25 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change this line,

OR empty($node['channelid']) OR empty($node['userid'])

to,

OR empty($node['channelid']) OR (empty($node['userid']) && ($node['userid'] != 0))
Reply With Quote
  #6  
Old 02-12-2016, 01:34 PM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
Change this line,

OR empty($node['channelid']) OR empty($node['userid'])

to,

OR empty($node['channelid']) OR (empty($node['userid']) && ($node['userid'] != 0))
Ah, okay . . .Thanks. .
Very good for all concerned. . . .:up:
Reply With Quote
  #7  
Old 02-12-2016, 02:12 PM
BugOutGirl BugOutGirl is offline
 
Join Date: Feb 2015
Location: Canada
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
I edited node.php per the post in the JIRA and it works.

The file:
/core/vb/api/node.php

From the JIRA posted by Igor Arkadia

Code:
The file:
/core/vb/api/node.php

The method:
getCreatepermissionsForEdit()

You check there if nodeid, channelid, userid etc are not defined and do "return array('createpermissions' => false);" if it's like this. The problem is how you do it:

if ... OR empty($node['userid']) OR ...

Posts of guests have userid = 0, the function empty() in PHP returns true if its argument is equal to 0. I agree it could be unexpected behavior of the function but it is how it works.
I guess it could be patched changing this code to something like:

... OR (empty($node['userid']) && ($node['userid'] != 0)) OR ...
This guy already seems to have found the issue, it just hasn't been fixed yet.

Whether or not it has unexpected results is yet to be discovered.
Thank you. I saw your post at .com as well.

Working in the code makes my head spin. I'll play around with this later.

Thanks again!
Reply With Quote
  #8  
Old 02-12-2016, 04:25 PM
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Location: Phoenix, Az. USA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This change will not survive an upgrade. It will have to be reapplied every upgrade until they fix it.
Reply With Quote
  #9  
Old 02-12-2016, 06:50 PM
DemOnstar's Avatar
DemOnstar DemOnstar is offline
 
Join Date: Dec 2012
Posts: 859
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Replicant View Post
This change will not survive an upgrade. It will have to be reapplied every upgrade until they fix it.
Great system they have going there . . .

Thanks for the reminder . . .
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:31 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.11069 seconds
  • Memory Usage 2,261KB
  • Queries Executed 13 (?)
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
  • (4)bbcode_code
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (3)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete