zanni
Total posts: 70
09 Янв 2015 04:10

Hi,

This many seem like a very simple question... how can I restrict a menu item or article. This isn't my firsr time using Emerald ,but I can't seem to get a particular article restricted:

www.womenabout.org/cms/wab2.5/index.php?option=com_content&view=article&id=129&Itemid=1346

Tried the scenario below (among others) and the item still shows to public and registered viewers.

view

article

id

129

Please help. D. Ashley

Последние изменения: 02 Март 2015


pepperstreet VIP
Total posts: 3,837
09 Янв 2015 04:29

Hello zanni,

Actually, it looks good to me. Should work, if there is an "=" operator ;)

  • Are you sure you are testing with a regular user or guest?
  • Did you set any other parameters to bypass any restrictions?
  • Do other restrictions work for you?
    (I remember you had already some special restrictions for some "tasks". So, I assume you have activated the required Emerald plugins)

Your example URL shows "Error - You are not authorised to view this resource." I assume this is an ACL setting for the article or MenuItem. So, I can't see if your link is restricted by Emerald or not.


Sergey
Total posts: 13,748
12 Янв 2015 04:34
  1. make sure Emerald restriction plugin is published.
  2. You can restrict article by ID if you use special rule adapter for core content

    2015-01-12_12-27-13

There are 3 ways to restrict article.

  1. The one you use with universal rule adapter
  2. With special adapter indicate IDs in (2)
  3. Create restriction rule with article individualization checkbox and then just add to artice {EMERALD S=1,2,3} (3)

If nothing works, please provide a login access with admin privileges.


zanni
Total posts: 70
13 Янв 2015 16:10

Hi,

I think this fix worked though I had to download an additional plugin: rule_emerald.j3.com_content.v.9.18

One more thing: is it possible to have the menu item not show at all unless a member has a subscription? Similar to the menu item Subcrption Control, though without changing the ACL to Special group only?

D. Ashley


pepperstreet VIP
Total posts: 3,837
13 Янв 2015 18:12

zanni though without changing the ACL to Special group only?

I think this would be the cleanest/easiest way to achieve that. A J! MenuItem does not know anything about the user's subscriptions. "ACL" is the Joomla core parameter to change the access/visibility... so, I would go this route. All can be done by configuration, and you don't have to code/override something.

(requires the Action - Change UserGroup)


Just loud thinking...

Another possibility could be to use the plugin Syntax inside a Menu/MenuItem override. The docs say it can be used "anywhere". But it means you would have to find and distinguish your menuItem programatically (either by type/name or id). Then condition the display by surrounding it with the Emerald plugin syntax.


pepperstreet VIP
Total posts: 3,837
13 Янв 2015 21:56

zanni I think this fix worked though I had to download an additional plugin: rule_emerald.j3.com_content.v.9.18

BTW, I did a quick test without special Article plugin. The simple universal URL method worked for me. Just used parameters like in your initial post.


Sergey
Total posts: 13,748
26 Фев 2015 08:29

I checked it with user Sergey. Everything works well. May be you are testing with user who have subsciption or one of the moderators or admins for whom restriction might be skipped.


zanni
Total posts: 70
26 Фев 2015 16:21

Hi Sergey,

The member I have signed in as is dash/dash123. It is a subscription I created. The subscription has lapsed and is inactive. I unpublished the subscription today and I can still see the link for download a PDF. If a subscriber's account has lapsed and is inactive (not unpublished) I don't want them to still have access to a restricted area.

I'm attaching images of the download page and unsubscribed acct. I can still see after signing in as dash. You will see after signing as admin that I have set several types of restrictions for this page in Emerald.

I wish this was simple, but it's not.

D. Ashley

Screen Shot 2015-02-26 at 11.02.09 AM\n\n Screen Shot 2015-02-26 at 11.10.38 AM


Sergey
Total posts: 13,748
27 Фев 2015 05:22

Even if user do not have subscription he will see that link.

2015-02-27_12-59-19

Because this link rights is "Registered"

2015-02-27_13-10-53

So all registered users will see this link in a mnu but will not be able to follow this link.

If you want to hide the link completely, then you have to set difefrent access level and use Change Group action, to move subscribed users to another group.

But unfortunately, if you do it now it will only apply to new subscribers since activation actions was already triggered for current subscribers.

On the other hand this is behaviour everyone likes. Because users can see what is available on the site. If there is no link in menu, user never know what he would get after purchase.


zanni
Total posts: 70
27 Фев 2015 17:03

Sergey,

Ok, I get what your are saying. And I can move the active subscribers to a new group: subscriber group. However, what I really want is the registered user to see the link but when they select the link they will get the "no access" available message. I should be able to do that.\n\n\n\n Also, shouldn't I be able to restrict this article by content? That is one of the features of Emerald. It's not happening.

D. Ashley


pepperstreet VIP
Total posts: 3,837
27 Фев 2015 18:18

zanni registered user to see the link but when they select the link they will get the "no access" available message.

This is your current link from the download article MenuItem:

.../index.php?option=com_content&view=article&id=138&Itemid=1074

Are you sure you have setup the correct parameters in your restriction rule? Please, check it again.
Do you use the universal rule?
Or the special com_content Adapter? (see previous comment and parameter screnshot by Sergey)


Alternative

BTW, if you want to guide the registered user even further, you might leave the access to the download article open... but instead condition the displayed content. See DOCS article with the special content plugin Syntax. This way you could create a very customized appearance of the article. i.e. Show a personal hint and encourage the user to subscribe or show a dimmed/inactive download button etc.


Sergey
Total posts: 13,748
02 Март 2015 10:59

zanni However, what I really want is the registered user to see the link but when they select the link they will get the "no access" available message

This is how it works right now. Please give me login and password of user who can access this link but should not be able.

zanni Also, shouldn't I be able to restrict this article by content?

What do you mean restrict by content?

Работает на Cobalt