Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of not being able to contribute to the front desk of phpcms

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you what to do if the phpcms receptionist cannot contribute. I hope you will gain a lot after reading this article. Let's discuss it together.

What if the phpcms receptionist cannot submit the contribution?

Error prompt: contribution is prohibited in the column.

Related recommendation: phpcms tutorial

With regard to this error report, the first thing that came to mind was that the contribution permission of the column was not turned on, so I went to see if the column turned on the contribution permission normally. This is mainly viewed in the background of the program.

In the background-- content-- Management column-- modify the column you want to contribute-- the member groups below the permission settings are allowed to contribute!

Update the site-wide cache should be OK!

Before that, you must set up the user's contribution permission user-- manage the member group-- modify the corresponding user group name--

Finally, just remember the cache.

-

However, this method has no effect on some customers, his website is mainly upgraded before the failure, in the PHPCMS official website forum, there are also some customers encounter such problems.

It turns out that the official answer to this question is a procedure bug, and the temporary solution is as follows:

Change the original phpcms/modules/member/content.php lines 111 to 118

Foreach ($CATEGORYS as $catid= > $cat) {if ($cat ['siteid'] = = $siteid & & $cat [' child'] = = 0 & & $cat ['type'] = = 0) break;} $catid= $_ GET [' catid']? Intval ($_ GET ['catid']): $catid; / / determine whether contributions are allowed in this column $priv_db = pc_base::load_model (' category_priv_model'); if (! $priv_db- > get_one (array ('catid'= > $catid,' roleid'= > $memberinfo ['groupid'],' is_admin'= > 0, 'action'= >' add')) showmessage (L ('category'). L (' publish_deny'), HTTP_REFERER))

Change to:

$priv_db = pc_base::load_model ('category_priv_model') / / load column permission table data model foreach ($CATEGORYS as $catid= > $cat) {if ($cat ['siteid'] = = $siteid & & $cat [' child'] = = 0 & & $cat ['type'] = = 0 & (! $priv_db- > get_one (array (' catid'= > $catid, 'is_admin'= > 0,' action'= > 'add')) | $priv_db- > get_one (array (' catid'= > $catid, 'roleid'= > $memberinfo [' groupid'], 'is_admin'= > 0) | 'action'= >' add') break } $catid = $_ GET ['catid']? Intval ($_ GET ['catid']): $catid; if (! $catid) showmessage (L (' category') .L ('publish_deny'), APP_PATH.'index.php?m=member') / / judge whether if ($priv_db- > get_one ('catid'= > $catid,' is_admin'= > 0, 'action'= >' add')) & &! $priv_db- > get_one (array ('catid'= > $catid,' roleid'= > $memberinfo ['groupid'],' is_admin'= > 0, 'action'= >' add')) showmessage (L ('category'). L (' publish_deny'), APP_PATH.'index.php?m=member') After reading this article, I believe you have a certain understanding of what the phpcms receptionist can't contribute. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report