Mirza
-
Posts
32 -
Joined
-
Last visited
Posts posted by Mirza
-
-
27 minutes ago, flydev said:
@Mirza Did you setup the PHP-FPM status page to grab more informations ?
It can return a lot of info using the full report
Thanks for this reply @flydev Let me try this.
-
@Robin S Thank you for your reply
I have already sent a direct message on pro modules support, awaiting his response.
-
Hi All,
Thanks for all the replies.
* We have already enabled the opcode.
* We are using PHP 7.2.6 already.
* Also, We have paid lister pro people are using it already.
* We have used ProCache also, but not much help.
* Our server Process Memory is going high as 2.5GB, Can you please advice/suggest us how to optimize.
* Our Db health is good.
* Php-fpm process memory is going high.
@Robin S We are not using any website against this, it's just a centralized data so Profiler will not help us.
This system will just import from JSON and export to JSON using cronjobs. We have also the paid profiler as well, but not helpful.
Is there any module where I can monitor processes running currently?
Appreciate your support on this.
Thanks in advance.
-
Hi All,
Hope you are all doing good.
We have the system which has 12 Million pages, We have used ProCache also, but not much help.
We have 40+ agents are working on the pages.
Our server Process Memory is going high as 2.5GB, Can you please advice/suggest us how to optimize.
Our Db health is good.
Php-fpm process memory is going high.
We are using the ListerPro as well.
Is there any module where I can monitor processes running currently?
Appreciate your support on this.
Thanks in advance.
- 1
-
Hi, Awesome's,
I am writing this post since I am facing the issue of performing slow admin panel.
Let me give a background, we have 40+ people adding content into the admin panel, we have pages around 1.5 million.
When people working all together in this system, we are facing the slow performance or PHP(fpm) consumption is getting higher.
Please give me any suggestions, on how to optimize an admin panel to accommodate 1.5 Million pages or more.
-
Thanks @DaveP @Pixrael @adrian for your answers.
Immediate after login I need to execute a javascript, but that didn't happened with admin custom files module or I am not adding the correct Process currently added ProcessLogin But it is not triggering.
worst part is when i click logout, its adding the login script.
Any help will be appreciated.
-
Hi All,
Is it possible to add GA scripts to admin panel pages, so that we can track all the users login/logout and each(edit) page duration per user using GA scripts.
Please let me know your suggestions.
Thanks in advance.
-
Hi Webhoes,
Hope you are doing good
Please find the below corrected piece of code.
<?php namespace ProcessWire; /** * @global Sanitizer $sanitizer * @global Inputfield $input * @global Page $page * @global Page $pages */ //if user has send a form you can use $input rather that $_POST if ($input->post->aFormFieldName) { //create page if form submitted $p = new Page(); $p->setOutputFormatting(false); $p->parent = $sanitizer->selectorField($_POST['country']);//Country should exists in the page tree $p->template = 'population'; // example template $p->title = $sanitizer->pageName($input->post->name); $p->name = $sanitizer->pageName($input->post->name); $p->email = $sanitizer->pageName($input->post->email); $p->body = $sanitizer->text($input->post->body); $p->save(); echo "page ID {$p->id} created!<br>"; return; // stop with template code here } ?> <h4>Add a sighting</h4> <form method="post" action='<?php echo $page->url; ?>'> Location <input type="text" name="name"><br> Country <select name="country"> <?php foreach ($pages->get(1022)->children as $country) { echo '<option value="' . $country->id . '>' . $country->title . '</option>'; } ?> </select> Subspecie <select name="subspecie"> <?php foreach ($pages->get(1027)->children as $subspecie) { echo '<option value="' . $subspecie->id . '>' . $subspecie->title . '</option>'; } ?> </select> Remark <input type="text" name="body"> E-mail: <input type="text" name="email"><br> <input type="submit" name="aFormFieldName" /> </form>
Please check if it helps.
- 2
-
Hi All,
I am trying to include the unit tests into our project which is in Processwire(I love it).
Directory structure for the same will be shown below
Here PWTestCase.php is the parent file where it is getting inherited from the PHPUNIT framework TestCase class and It is in same namespace ProcessWire; as shown below
Now I have a basic unit test(FuncTest.php as shown below) to check the language calling the function getLanguage() residing in site/templates/_func.php.
***when try to run this test, getting undefined function getLanguage as shown below***
Since I am using namespace ProcessWire; & bootstraping processwire in PWTestCase why i am not able to access functions? Can you please suggest where i am going wrong?
Thanks in advance.
-
3 hours ago, Zeka said:
As far as I know, there is no multilanguage support. As workaround, if I'm not mistaken you, can switch user language in admin and then make import of your pages. They will be imported into the selected language.
Thanks for the response, But that didn't work, page name should be in english.
Trying for another solution.
-
4 hours ago, teppo said:
7.1 introduces a number of backwards incompatible changes, so 7.0 support might not necessarily imply 7.1 support. @Mirza, please report any issues you see via the processwire-issues GitHub repository or this forum so that we can deal with them.
Thanks!
Thanks for the reply
-
36 minutes ago, PWaddict said:
ProcessWire is already supports php 7. That's the php version I'm using.
Thanks for the quick reply, I ran out with some issues earlier with php 7.1. Let me try one more time.
-
Any plans to support for processwire with php 7?
-
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.
-
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|دوبلكس -
How to track user active time based on session login and logout.
Basically, I want to get the report that each user login time and logout time/session inactivity time.
Is there any module available or we can use any hooks to simulate the above.
Thanks in advance for your support.
-
Hi Robin S,
Thank you for the reply, Let me try this.
-
10 minutes ago, Sérgio Jardim said:
You probably set your publish_date field to automatically set a default date (NOW()) on page save.
I have not set any value to the publish field on page save, I do checked the pages table schema which has default null value.
Might be any module which has a hook will be affecting, Let me give a try.
-
-
Hi All,
I have created a script which will create the pages and it should be unpublished.
I have added the status as unpublished by default while first time saving the page as below.
$hotelPage->hotel_website = $hotel['hotelWebsite']; // By default page created will be unpublished state $hotelPage->addStatus(Page::statusUnpublished);
$hotelPage->save(); $hotelPage->setOutputFormatting(false); // Add hotel images only after setting output formatting to false $hotelPage->images->add($hotel['hotelImage']); $hotelPage->save();
On the same time, saving the hotel image as well and triggering the save method.
But when I see the created page in the tree, Its shows unpublished but publish_date is not empty(date will be present as created, modified and published are all same)
Now I don't understand why the date is getting filled into the publish field for a page?
Please let me know if am doing something wrong.
-
Got it, Oops I missed it.
Thanks for the quick response, its solved Sérgio Jardim
Thanks for the alternate solution tpr I will try this as well.
-
-
Hi All,
I have a processwire setup for multi language which is english and arabic.
I have a template called hotel which has title field act as hotel name for both EN & AR language.
Since a week ago I was getting the error in
QuoteSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '88-14191' for key 'name1056_parent_id'
Since we have key in pages table which states as below
QuoteUNIQUE KEY `name1056_parent_id` (`name1056`,`parent_id`),
So the field name1056 should store the Arabic value of the title field.
But its not storing the arabic value, since we have CHARACTER SET ascii for the field `name1056` as below
Quote`name1056` varchar(128) CHARACTER SET ascii DEFAULT NULL,
Can anyone explain me
* On what basis character set is defined?
* Is there any specific reason for setting the ASCII character set?
Thanks in advance for the help.
-
Hi, Even I am facing the same issue, do we have any solution for this?
I have a field which holds multi language called hotel name when it tries to change the Arabic name to some other value and save it says the below error and Arabic field value not saved.
QuoteSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '88-14191' for key 'name1056_parent_id'
When I checked in DB pages table has unique key
QuoteUNIQUE KEY `name1056_parent_id` (`name1056`,`parent_id`),
as shown in the attachment.
The value for field name1056 is null but It has value saved for Arabic text already.
Now, I am stuck with this issue, anyone has any solution to this?
Session handler DB issue
in General Support
Posted
Hi @Sevarf2
I am also dealing with the same problem, by any chance did you have any solution to this problem?