Drupal 7 field forced into value on save - drupal

So I'm working on a project that has been through many freelancers before it got to me.
I've got this issue if I've got a sale with a field that has a field called "sale type" set to "customer sale" it will automatically set the field "authorised" to "authorised".
I've searched the entire code base from the base site through all the custom modules for the machine name of the "authorised" field which has the machine name"field_auth_code". Nowhere is it programmatically setting "field_auth_code" to 1 in an undesirable fashion. So I can only assume that it might a drupal setting or module setting that gives you the functionality on the front end to do this but i can't seem to find any menu that leads to this option.
So to clarify the logic for this:
Node bundle is "sale"
"field_sale_type" is "customer sale"
On node_save can be (insert or update)
Set "field_auth_code" to authorised
I know this only happens on node_save hooks because if i use field_attach_update it doesn't get auto authorised.
Any thoughts would be appreciated

Related

Wordpress Advanced Custom Fields - Limit A User's Choice To One Option

I have a WordPress website and as part of the news items, the editor can add either an:
internal link OR
external link OR
file
Currently I have this set up as a repeater field with maximum rows set to 1.
Is it possible if say one value has been entered, to prevent another of the values from being filled in.
E.g. I add an internal link and then try to add an external link. A message of some sort is then shown to me to say that only one value can be selected at a time.
I know I can add a description to the field with this information but I want to make it idiot proof so that the user can never add more than one value.
Thanks for your time and help in advance.
I can't write this in comments but celeriko right. Install types plugin there is ability of conditional logic. You can very easy implement of from backend.
Types: http://wp-types.com/
Reagrds

How to use the Concrete5 "Page Rating" Add-On

I have a page that shows search results containing pages that matched the search criteria. All of the pages returned are the same type of page (e.g., a person's profile). I want to add a star rating system to it so users can rate the profile.
I've tried adding a custom page attribute and updating it using the output rating helper but that didn't work. It looked like it worked but when I refreshed the page it just went back to whatever the rating was set to originally.
So, I added the "Page Ratings" add-on (https://www.concrete5.org/marketplace/addons/page-ratings/) and installed it. There are supposed to be 2 blocks associalted with it. I'm assuming the list block is the one I need in my case. However, when I go to the page and try to add one of those blocks to my area I don't see them listed. Does anyone know how to use this add-on? There is barely any documentation for it.
You do realize this is a "pay for" application? As such, most of the Developers that do charge for their add-ons are very responsive. Not to push you away from here, but if you have a problem with the installation, payment, etc. Really should be addressed by the Developer.

Drupal6 - Display specific View from a specific user in page

I need a help displaying a specific View result in a page which the user created it.
story...
"User X has created a Page called My Store and UserX has products which was created in custom Content Item."
Now how do I show this UserX's products in his My Store page?
I have already made a view called User_Store_View, I added a Page Display and on Page Settings:Path, the value was "node/%".. now I guess my problem is on the Arguments?
The path should be something like my-store and it should have an argument of user id. Given your requirements I think setting the default behaviour for the argument being invalid or not being supplied to an empty result set would be the most sensible(I think the default is show all). That may be all you really need.
However, if your product is a type that you've created yourself you will need to do some behind the scenes wiring to expose all your fields to Views; it's almost always better to build a content type using CCK so it's already hooked up to Views. And D7 is a different beast in this regard, with fields part of core and whatnot, so I can't help you out there.

Issue with "modify taxonomy"

I'm working with Drupal 6 to create a feed collecting site. I import the original feeds via the feeds module and copy their tags. But I also want to assign a category (terms from second taxonomy) according to the author name to be able to divide the content in a unified way.
I want to use the rules module (rules-6.x-1.2) to assign these categories upon import. I use the following steps:
ON event Content is going to be saved
IF textual comparison ([node:author-name], TheAuthorName)
DO Modify node taxonomy terms (saved content, permanently, add the selected terms)
I select the terms to be added as "-none selected-" for tags and "TheCategory" for categories.
Now, when I import the feed, the category "TheCategory" is added to the content, but the tags vanish.
This happens also if I select "Replace existing terms with selected ones" or "Replace terms within same vocabulary" for the action. Upon editing, always the radio button of "add …" is selected, regardless of what I entered previously. And yes, I clicked on "save".
Is this the right way to do what I want? Why isn't it working? Could I do this with another module maybe (I don't need rules for anything else …)?
Thanks for your help!
Ok, so I found out that the right trigger to do this is "new content is created" (which I somehow couldn't get to work beforehand).
So, I ran the rules module in debug mode and found that the rule was triggered, the filter returned TRUE and the modify node taxonomy action was successfully accomplished. But the taxonomy was entirely unchanged.
I played around a little and postponed a "save content" action on the newly created content. Turns out, this fixed the problem and now everything works as I intended.
Still, there are some flaws:
I checked "permanently apply changes", but it did not do anything.
I unchecked "permanently apply changes", but upon editing again, the box was checked again (probably the setting was not saved to begin with)
The same holds true for the radio buttons for the type of "modify node taxonomy" action which was obviously not saved
Maybe this can help someone.

Drupal : Drupal6 views : Filter restriction

I am a newbie to Drupal, hope somebody can answer my query.
I think I am facing a weird problem in views..I have a content type of say Company and have around 3-4 pages added to it. The sequence is as
1. Company - default page
2. View company
3. Search company
4. New page
The problem is when I go and add a Filter to the Search company page then that filter get shared with the default page and new page but doesn't get shared with the view company page, I am not sure what is causing this as I want that filter to be applicable for the search page and do not get shared across other pages.
is there a setting where I can restrict this filter getting shared ?
Thanks in advance
- Dev-Drupal.
If you want to set a filter only for one display, you have to, on the configuration of that display :
specify that the filters should "override" the default ones
specific the specific filters you want on that display.
See What are overrides? for a little longer description.
Basically, on the configuration of the "Search company" display, when you are trying to configure filters, you should choose "override" before specifying your filters.

Resources