Mirza

Arabic content changes not available in page getChanges method

Recommended Posts

Hi All,

Arabic content changes not available in page getChanges method

While editing the page from admin panel in the multi-language field, added a hook to save the changes made to the page.

 

$this->pages->addHookAfter('saveReady', $this, 'hookUpdateLog');

 

public function hookUpdateLog(HookEvent $event) {
    $page = $event->arguments[0];

    if(in_array($page->template->name, $this->templateList)) {
        $this->logFieldChanges($page);
    }
}
public function logFieldChanges($page) {
    $changes = $page->getChanges(); //This changes does not contain the field of arabic changes.

}

Please let me know, If I am approaching in a right way.

Screen Shot 2017-11-14 at 10.50.21 AM.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By JurgenP
      First of all I'm as new to ProcessWire (PW) as they come, so bear with me if I ask stupid questions with obvious answers.
      I started looking into PW because I'm looking for something that would take out some of the grunt work of building an applications, yet be flexible enough to be able to implement custom functionality.
      I'm trying to work out if PW is suitable for my needs, ...
      A the moment I'm trying to create an architecture for a web platform on which multiple websites/webshops (750-1000) for pharmacists will be run.
      The websites will have different types of information, obviously there will be the 'own' pages the pharmacists create themselves.
      But as pharmacists tend 'not to be computer people' there is also content provided by the platform to make the site look alive, as well as public health information provided by the goverment.
      I was wondering if there is a way to structure/set up PW so that they have full access to their own content, and limited access (basically chose to publish it or not) to the externally provided content.
      Also is there a way to have the templates/page for the own content located in their own folder, and the 'external ones' in a shared folder so that they don't have to be repeated 1000 times on the server (and if modifications need to be done, it only has to be done once as well).
      Sincerely,
      Jurgen
    • By nickngqs
      Does anyone know how to do an export of a page entries to CSV using the Processwire way?
      I'm trying to setup a list where the client can see a list of user's form values.

      Example ->
      A front end form -> Upon submit -> Adds to database -> Shows on the admin of Processwire.

      From there, I can see the entries and sort stuff. And lastly I can export them in CSV.

      I'm looking at the Processwire cheatsheet and see the $files, is this the one I should be looking at? 
    • By cosmicsafari
      Hi all,
      Im a bit confused by an issue I have come across today.
      I have a module which connects to a third party (once an hour using LazyCron), parses a publicly available XML file, turns it into useable information which I then use the API to save as PW Pages.
      On the whole this has been working great however today I noticed that it kept failing on one of the imports.
      After doing some investigation I realised its appears to be dying at the save page stage.
      From the documentation $page-save() should return either True/False, so I thought I would update the code to reflect this while debugging.
      $this->log(1); $bool = $p->save(); if($bool){ $this->log('Saved successfully'); } else { $this->log('Fail to save'); } $this->log(2); However the script only gets to the save() part and then appears to terminate. Then when checking the error log the latest entry is always just '1'
      Any ideas as i'm a tad confused why I at least don't get a response of some kind?
       
       
       
    • By Gideon So
      Hi,
      I have a website with multi-languages support and a frontend form for course registration. If a user choose English which is not the default language, the page title only save to the English tab of the page title.
      How can I save the page title to the default language through API??
      Gideon
    • By Mirza
      Support for Multi-Language field in Module: Import Pages from CSV file 
      Is there a support for multi language field import option from csv?
      If yes, what will be the structure for csv file data.
       
      Case scenario:
      I have title field which is multi-language field(English & Arabic).
      business|بزنيس
      club|كلوب
      deluxe|ديلوكس
      duplex|دوبلكس