Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6471845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:16:20+00:00 2026-05-25T06:16:20+00:00

It looks like it is possible using a custom module with a menu callback,

  • 0

It looks like it is possible using a custom module with a menu callback, and then an ajax callback function from the page.
But before I waste time exploring, I’m sure someone must have done this before. Any tips?

Is it adequate to just update the node variable and call field_attach_update()? And what about security?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:16:20+00:00Added an answer on May 25, 2026 at 6:16 am

    For security:

    You can make sure that the menu hook uses the correct permission access

    In menu hook:

     $items['/ajax/%/edit'] = array(
        'title' => 'something',
        'page callback' => 'your_edit_callback',
        'page arguments' => array(1),
        'access callback' => 'node_access',
        'access arguments' => array('update', 1),
        'type' => MENU_LOCAL_TASK,
      );
    
    function your_edit_callback($node_id){
    //something that edits the node here, only user(s) with node_access will be able to get here.
    }
    

    about node access:
    * In determining access rights for a node, node_access() first checks
    * whether the user has the “bypass node access” permission. Such users have
    * unrestricted access to all nodes. user 1 will always pass this check.

    I have personally never used field_attach, but relied on node_save.

    $node = node_load($node_id);
    $node->field_fieldname[LANGUAGE_NONE][0]['value'] = "monkeys";
    node_save($node);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom class that looks like: function myClass(){ var thing; var thingtype;
After peeking around the internet it looks like it is possible to interop between
Is this possible in any way? My project folder structure looks like this: my_project:
is it possible to get the last value of an string, that looks like
I'm looking for possible ways to persist the following classes. Subsonic SimpleRepository looks like
I'm creating custom UITableViewCells using the approach outlined on this page: http://icodeblog.com/2009/05/24/custom-uitableviewcell-using-interface-builder/ So my
I have a Visualforce page using a custom controller that is used to edit
If it is possible, how does the parameter need to look like in the
Looks like here in StackOveflow there is a group of F# enthusiasts. I'd like
Looks like my only option is to create a mutatant child of the tree

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.