Jump to content
Peter Knight

Cant publish role

Recommended Posts

Hi guys

Having problems publishing a new role.

I can create it, tick the permission checkboxes and hit publish.

Once I return to the Roles overview page, the role remains unpublished.

post-1166-0-60307400-1460718766_thumb.jp

I'm preforming this action as a super-user with full permissions so I should be able to achieve this.

As all things PW-related are pages, I tried too to drill down through the page tree and directly manipulate the page under 

Tree > Admin > Access > Roles

No joy there either.

This is on 2.7.3 dev. Nothing in the error logs and I have a few sites based on this site in exact same environment with no role problems.

Any tips?

Share this post


Link to post
Share on other sites

Hey Matrijn

I'm not sure what you mean. 

I've tried publishing this page directly from the page list / tree and had the same result.

Is that what you meant?

P

Share this post


Link to post
Share on other sites

I haven't fixed this but I might be making progress.

I get a brief error message when I try to publish the editor role

Saved Page: /processwire/access/roles/editor/ (1 change) - Cannot be published until errors are corrected

The only actual error is the persistent

Unrecognized HTTP host:'www.your-website.com' - Please update your $config->httpHosts setting in /site/config.php - read more

I've tried everything to resolve the host problem:

  • delete the sessions folder
  • deleted the cache folder
  • checked and double checked the confi files in both site and wire folders
  • removed the Config module

It's a persistent bugger :-/

Share this post


Link to post
Share on other sites

Have you entered your host in the config?

Yep. I added it to the config, uploaded, checked it was online.

I've even removed it and then tried some forum tips of removing the host from the config completely.

I've tried manually updating the config file in /wire/ too.

Pretty much tried everything 

Share this post


Link to post
Share on other sites

Well this message, behaviour and error only shows if your domain isn't in the hosts config.

Share this post


Link to post
Share on other sites

Well this message, behaviour and error only shows if your domain isn't in the hosts config.

My screengrabs disagree ...

My /site/config.php file

post-1166-0-12542700-1460971050_thumb.jp

My config settings in the Config Module

post-1166-0-50270900-1460971083_thumb.jp

The only other place that httpHosts is set is in /wire/config.php and that's blank / default.

This is a site I based on another site by doing a crude file and database copy and it has the same $config->userAuthSalt setting.

I wonder could that be a cause? 

Share this post


Link to post
Share on other sites

I'm not sure but I think protocol isn't needed here (http/s).

Share this post


Link to post
Share on other sites

I'm not sure but I think protocol isn't needed here (http/s).

I think you're right. I just added that in before I took screen grabs. Removing has no effect.

Share this post


Link to post
Share on other sites

Just to make sure, this doesn't have anything to do with roles, you can't save anything else too? Well I don't know, since the message shows up, the problem lays right there. Maybe somehow your host resolved is different than what you enter.

Share this post


Link to post
Share on other sites

What if you disable the config module and just use the /site/config.php? Have you entered the domains in both?

Also, you might want to check if ProcessWire (or PHP) is able to get the proper hostname. I had one case (on a shady server, long time ago) where PHP didn't recieve the proper hostname so ProcessWire kept telling me that I needed to update the hostname.

  • Like 2

Share this post


Link to post
Share on other sites

What if you disable the config module and just use the /site/config.php? 

Removing the entire Module doesn't work. The error persists.

However, I noticed that you can leave the Module installed but just remove the offending config setting.

post-1166-0-24973300-1460973787_thumb.jp

That worked :)

  • Like 1

Share this post


Link to post
Share on other sites

Glad you got it working.

Removing the entire Module doesn't work. The error persists.

You could check if the config.json file still exists in your /site/assets/config/ folder. And be sure to remove this code from your /site/config.php.

Share this post


Link to post
Share on other sites

Glad you got it working.

You could check if the config.json file still exists in your /site/assets/config/ folder. And be sure to remove this code from your /site/config.php.

So am I. I love getting editors their access and seeing them update their PW sites. Great to have this solved.

I don't think I need to remove that code from site/config.php as I'm still using the Module for a few settings

"defaultAdminTheme": "AdminThemeReno",
    "debug": false,
    "adminEmail": "peter@net.not"

I've just removed a particular config within the config module.

Share this post


Link to post
Share on other sites

So am I. I love getting editors their access and seeing them update their PW sites. Great to have this solved.

Regarding this business: next to payments the best feeling in the world :)

Share this post


Link to post
Share on other sites

Fixing the config is universally a good thing ;)

  • Like 1

Share this post


Link to post
Share on other sites

Just a quick update on the above in case anyone else runs into problems with this.

Having had the solution work for most sites, today I had a persistent "unrecognised HTTP host" message even though 

  • config module was uninstalled
  • congig settings were correct
  • caches were cleared 
    etc

As soon as I fired up the same site Admin in a different browser, the issue disappeared and I could publish roles etc.

In this case it was Google Chromes cache caching my old config files.

Over and out !

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By AndZyk
      Hello,
      this maybe a simple question, but it bothers me for a while now:
      There used to be a warning, if two or more user try to edit the same page. But ever since AdminThemeUIkit I haven't seen it any more.
      Is this a bug or are there special circumstances under which the warning will be displayed?
      If I am logged-in in the same browser with one default and one privat window, I don't see this warning. But also different browsers on different machines in the same network don't see this warning.
      I was looking for the blog post on which this feature was announced, but couldn't find it anymore.
      We had the case, that two people were writing a text for the same page, but after person A saved the page first, the text of the person B was lost. I know we could have used ProDrafts for this case, but it shouldn't happen in the first place.
      I would appreciate some feedback. 😀
      Regards, Andreas
    • By pwFoo
      Hi,
      I try to add page-edit-own and page-delete-own permissions, but it's strange...
      If a add the custom permissions it looks like both are children of page-edit respectively page-delete. I played with added / revoked permissions, but I can't get it work, that a user of a role just can delete own content.
      First the user can't delete any content and now the user can delete own and foreign pages 🤪
      Is there a tutorial to learn more about the PW permissions?
      Or do I have to rename the permissions to page-own-edit and page-own-delete to be independent from page-edit and page-delete?
    • By angelo, italy
      Hi guys,
      I've always used WP but I want to swtich to PW. I'm not sure ....
      I'd like to know if it's possible to create a website for an online photo contest.
      The participants of the competition could create their own account, in which they upload their photos. The photos uploaded remain visible only to themselves and the judges.
      From their account they can make the "entrance fee" payment.
      The judges of the competition can create their own account... entering they see the photos of the participants and vote photos
      At the main page I imagine the title of the competition, a button to read the regulation, and a button to register.
      The website should be in Italian and English.
      Thank you!!
       
       
    • By SwimToWin
      I have a website that allows users to create their personal "website" (a page with sub-pages).
      Users shall be able to:
      Log in (frontend and/or admin), Edit "their" page(s) - I am using the "Page Edit Per User"-module (https://modules.processwire.com/modules/page-edit-per-user/) to grant access to the relevant pages Create child pages - possible? Users shall not be able to see other pages in the admin interface - "Admin Restrict Page Tree" may do the trick (https://modules.processwire.com/modules/admin-restrict-page-tree/)? Frontend editing shall be possible - I am considering "Fredi" (https://modules.processwire.com/modules/fredi/) for this. The challenge is that it takes a lot of modules and configuration.
      Is there a way to set this up that doesn't require a lot of configuration for each new user?
    • By Guy Incognito
      Hi all. We've created a private log-in area for a client on their site that is restricted on a roles basis. Is there a simple solution available to let them upload files to a file field and then choose individual users that can access individual files?
      Does that make sense?!... it's hard to search for answers to this as all results pertain to server file permissions.
       
×
×
  • Create New...