رفتن به مطلب
رونمایی از اولین و قویترین قالب IPS در ایران و در مارکتهای جهانی ×

test title

Please upload image with appropriate resolution.

 

 



More

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.



More

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.



More

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.



More

Splitting posts into new topic causes them to disappear if first post is guest post


پست های پیشنهاد شده

  • تیم مدیریت

Steps to reproduce:

  • Create a test topic in a forum where guests does NOT have permission to post new topics
  • Reply with a test account, or temporarily allow guests to post topics and replies.
    • If you replied with a test account: delete the test account so the reply becomes a guest post
    • If you posted as a guest: remember to reset the forum permissions to once again disallow guest topics/replies
  • As a moderator: select the reply and split it into a new topic in the same forum with your moderator tools
  • You should be redirected to the new topic created by splitting the posts
    • Instead you'll get an error page: "You do not have permission to view this topic." (Error code: 2F173/K)

The reason is that the new topic is saved to the database with the approved column set to -3. Which in system/Content/Content.php is documented as:
"@li -3 is a post made by a guest using the "post before register" feature"

Please note that this will happen even if the system "Post before register" is disabled. It shouldn't happen in either cases.

Also; since there is no way to get a list of topics and replies hidden for this reason, it's not possible to save the topic from the interface, you'll have to manually fix it in the database. 

I think this happens because of the following code for the function createItem in system/Content/Item.php. 

I'm pretty sure you'll have to fix the logic for both the approved and hidden switch. 

<?php
	case 'approved':
		if ( $hidden === NULL )
		{
			if ( !$author->member_id and $container and !$container->can( 'add', $author, FALSE ) )
			{
				$val = -3;
			}
			else
			{
				$val = static::moderateNewItems( $author, $container ) ? 0 : 1;
			}
		}
		else
		{
			$val = \intval( !$hidden );
		}
		break;

	case 'hidden':
		if ( $hidden === NULL )
		{
			if ( !$author->member_id and $container and !$container->can( 'add', $author, FALSE ) )
			{
				$val = -3;
			}
			else
			{
				$val = static::moderateNewItems( $author, $container ) ? 1 : 0;
			}
		}
		else
		{
			$val = \intval( $hidden );
		}
		break;

 

View the full Question

لینک به دیدگاه
به اشتراک گذاری در سایت های دیگر

  • تعداد پاسخ 0
  • زمان ایجاد
  • آخرین پاسخ

بهترین ارسال کنندگان این موضوع

روزهای محبوب

بهترین ارسال کنندگان این موضوع

روزهای محبوب

مهمان
این موضوع برای عدم ارسال قفل گردیده است.
  • کاربران آنلاین در این صفحه   0 کاربر

    • هیچ کاربر عضوی،در حال مشاهده این صفحه نیست.
×
×
  • ایجاد مورد جدید...

اطلاعات مهم

برای تجربه رابط کاربری بهتر و تعامل بهتر شما با انجمن ما از کوکی ها استفاده میکنیم قوانین