vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   Unregistered user post (https://vborg.vbsupport.ru/showthread.php?t=321672)

DemOnstar 01-31-2016 07:20 PM

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. . .

BugOutGirl 02-11-2016 07:44 PM

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

Replicant 02-12-2016 01:49 AM

Quote:

Originally Posted by DemOnstar (Post 2563944)
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. :D

DemOnstar 02-12-2016 08:46 AM

Quote:

Originally Posted by BugOutGirl (Post 2564686)
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 (Post 2564698)

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 (Post 2564495)
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. . .:D

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

Quote:

Originally Posted by Replicant (Post 2564698)
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. :D

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?

Replicant 02-12-2016 12:25 PM

Change this line,

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

to,

OR empty($node['channelid']) OR (empty($node['userid']) && ($node['userid'] != 0))

DemOnstar 02-12-2016 01:34 PM

Quote:

Originally Posted by Replicant (Post 2564719)
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:

BugOutGirl 02-12-2016 02:12 PM

Quote:

Originally Posted by Replicant (Post 2564698)
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. :D

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!

Replicant 02-12-2016 04:25 PM

This change will not survive an upgrade. It will have to be reapplied every upgrade until they fix it.

DemOnstar 02-12-2016 06:50 PM

Quote:

Originally Posted by Replicant (Post 2564734)
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 . . .


All times are GMT. The time now is 04:04 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.01141 seconds
  • Memory Usage 1,752KB
  • 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
  • (4)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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