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 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|دوبلكس
       
    • By ov3rtak3r
      Hello everyone!
      I am new to Processwire and really like it, but now I have a problem that I can't solve by myself.
      I have created following templates:
      data_people (no template-file)
      person_listing (person_listing.php)
      person_detail (person_detail.php)

      I have added the following Pages:
      Actor, Director, Stuff using template person_listing.php [visible in frontend]
      "People" using template data_people [not visible, only for data]
      -> "Georg Klonee" using template person_detail [is visible, but should not be shown using path /en/person/georg-klonee]

      Example Person: Georg Klonee
      The Problem:
      He is a Actor and a Director, so I want him to be shown in the Listing of /en/actors and /en/directors. No problem until here - it works. But now, when I click him, the URL for the Detail-Page is unfortunately /en/person/georg-klonee. But I want it to be /en/actors/georg-klonee, if i open the details from Actors-Page (and of course /en/directors/georg-klonee when on Directors-Page).
      How can I get this to work? I am also using TemplateEngine-Module with TemplateTwigEngine-Module, hopefully this won't be a problem? I tried it with URL-Segments for person_listing.php. But how can I abort the rendering of people_listing and start rendering person_detail.php?
       
      Thanks for your help in advance.
    • By mcwhitey
      Hi,
      How can I display, on every page of my site, what roles can view that pages template, based on what is checked in settings>templates>template-name>ACCESS TAB?
      I've only gotten as far as displaying the name of the current template: echo $page->template->get('name'); But I'm stuck here. Tried things like $page->template->get('permissions'); but I guess it's a bit more complicated than that.
      Hope someone van point me in the right direction.
      Cheers.
    • By awesomolocity
      Alright. So I'm converting a site I already have to Processwire (really enjoying it so far!). I wanted to convert the previous tables that I had data in to Processwire pages. But I'm wondering what the optimal way to structure pages would be.
       
      So basically, I have three main tables.
      Users (and all accompanying information)
      Items (and all accompanying information)
      Aquariums (each user only has 1 aquarium. Currently, user_id is a FK)
      Fish (type of item. Aquariums may have multiple fish)
      Aqua_settings (Things like lightness, temperature, etc)
       
      So in my current setup, there are a lot of Foreign Keys. I could accomplish essentially the same thing by using the Page Reference field.
      Alternatively, I could make fish and aqua_settings both be children of Aquarium. I could differentiate by doing $aquarium->children('template=aqua_settings'); or something.
       
      So my question is...should I be using the Page Reference field or structuring the pages as children? (Or are both equally fine depending on how I want to go about doing things)