Jump to content

PavelRadvan

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by PavelRadvan

  1. It it here https://processwire.com/talk/messenger/5614/?do=findComment&comment=34986
  2. Thanks for reply. I am just figuring another think and it is validating data before creation of new page - it is for preparing right contract number so customer just click on new contract button on frontend and PW should prepare new page with constructed name from several parts and fields. But I need to validate if there is not already another contract number already, but before it is created. I already discussed this with @ryan, but it seems that he is quite busy. I will invite you to this and just need some small hint to figure it...
  3. It seems I find myself where is problem with script from you. This version is working for me: foreach($pages->find("template=ks-import-hlavicka") as $cp) { $polozky = $pages->find("template=polozka_ks, id_hlavicka_ks={$cp->id_hlavicka_ks}, status<" . Page::statusTrash); $cp->Polozky_ks->add($polozky); $cp->setAndSave('Polozky_ks',$polozky); } Most important is that in setAndSave is needed to specify that page field to which I need to save changes and update data... Without it there was no change in data...and no linked other pages... Regarding page reference field with single-page input, there is not needed to use "add" method. It throws error if I used it for adding data, because I had same data already on same page... I tried to add linked page with customer data to contract page and it is always only one customer for contract... So thanks for your initial hint with script and now it is working...hope this could help to others also...
  4. Hi. I did not have time to test it sooner so I did it today. I used your script which was run from tracy console and there is final variant of it : foreach($pages->find("template=ks-import-hlavicka") as $cp) { $polozky = $pages->find("template=polozka_ks, id_hlavicka_ks={$cp->id_hlavicka_ks}, status<" . Page::statusTrash); $cp->id_polozka_ks->add($polozky); $cp->setAndSave('polozky'); } where id_polozka_ks is that integer id field which is on both pages of contracts and products. As you could see in one of contract pages, there is no linked data: But system is linked to see items from products template: Script just reported that executed with 4487.67 ms, 15.1 MB What do you think of it - is there any problematic part or I need some permissions to interconnect data to pages ? Thanks for reply Pavel
  5. OK. Now I understand...so that is only github update check date...I see it is on other modules too...
  6. Hi. Thanks for answer. I have another project which is based on PHP 8.3 and I think there is no warning in vscode... Regarding version and updates I am little bit confused with this: Screenshot from PW module repository: Screenshot from github: Which is right ? github or pw in date of updated ? Is module on pw repository same with content or on github...?
  7. Hi. Your module is super and backups are working nice. I have there error from VSCODE which is showing this: ${} string interpolation' is deprecated since PHP 8.2 It is in this file: \site\modules\Duplicator\Classes\ClientAmazonS3.php Also there is date of update module on PW directory 2024/05/14 and I have version 1.5.2 which is latest but not from 14yh May this year... Is the date of development version or where I could get actual version? Is that error in new version solved ? Thank you
  8. Hi. Thank you. I hope this evening try it. If there will be some problem I will let you know...
  9. Hi. Thanks very much. I will test it and let you know
  10. Thanks very much for reply and I have to explain current situation more. I am sorry but mys system is in my language (Czech), but I think it is clearly visible in pictures how are fields and IDs. I have imported data from Access in form of CSV trable files. This import was done always from one table to one page to create lots of children pages. I could as ne example of data take table with one type contracts named "ks-hlavicka" which is table of contracts (chidren pages) and details (head of contract) and products table is named "ks-old-pol" (also children pages). Each of those tables have numeric field "id_hlavicka_ks" with label ID hlavičky KS or ID hl KS. Here are screenshots from admin (backend): Contract: Product item: As you could see there is same ID in both pages. This is actual current situation. There is not page reference field yet in those pages - I need to know how to prepare it to template for scripts or guides or by your advice... On Frontend I could use API of PW to show content by ID but I would like to have interconnected pages also visible in admin (backend). What I want is to achieve this - it is example of created contract on another page with products items linked in page reference field: Same functionality I would like to have same for product also with connected customers(also they have IDs) which are on contracts. But after I will have some script or guide to link products I think other connected data could be handled by same way. Here are screenshots of templates for contract (ks_hlavicka) and product item (ks_polozka_old): Does this helped to you to understand ? Let me know how you think is possible to make that interlinked connections. Thanks Pavel
  11. Yes. There is imported lots of pages of product items (products) with "contract head ID". Same "contract head ID" is also on pages which are contracts. I am using pages->find and pages->get and other function on frontend to show them by this ID - so it now all works on frontend. But when I click to edit product in backend it shows only current product without link to contract there. So reason for this is to have editable contracts in backend and with already selected products(multiple) in page reference field of specific contract. When I create now in PW new contract I could select by page reference field multiple products - but I do not want to do it manually for next several thousands of contracts... I hope this is understandable for you...
  12. I have more explored your script. I do not have array of products IDs. I have products as pages already in PW and each of this product has numeric field with its ID. Is it possible to link all those pages(they have main parent page("products") by this script with corresponding pages by same contract ID ?
  13. Thank you very much and I will try it. I will let you know how it worked.
  14. Hi. Thanks for help and you understand well. I can clarify that numeric field (ID) is saved on both contract and product page. I would appreciate to have some script to handle links.
  15. I have quite specific question. I am working on app in processwire which Is for contract and product management. I have already quite lots of pages with imported data. I need to establish link for page(contract) which should be connected with multiple pages (products). Imported data have same numeric field on contract template and also on product template. This field is not a name or title of page. Now is all achievable on fronted where is possible to prepare markup with selected data. But I need to have this connected in backend(admin) - is possible to connect fields between pages 1:n from already created data? Reason for this is to have option to edit connected data in backend ... I would appreciate any advice. Anybody know how to do this?
  16. I uninstalled and also updated my server. Now is module installed again and it seems it is ok. Thanks for support
  17. OK. I have found but do not have that TraceApiData.proceduralFunctions: Should I set some settings on or off?
  18. Hi. Where is possible to have this panel you sent screenshot ? I cannot find which panel it is ... Here is screen from my panel config of tracy: How to see that you posted? Thanks Pavel
  19. Thanks for reply. I installed php-tokenizer extension and now there is another error : ErrorException: Undefined array key "pwFunctions" in /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php:25 Stack trace: #0 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php(25): Tracy\Bar->Tracy\{closure}(2, '...', '...', 25) #1 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php(3082): TracyPwApiData->getApiData('...') #2 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ConsolePanel.php(154): TracyDebugger::getApiData('...') #3 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(143): ConsolePanel->getPanel() #4 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(115): Tracy\Bar->renderPanels('') #5 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(89): Tracy\Bar->renderPartial('...') #6 /usr/local/www/apache24/data/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent)) #7 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/Debugger.php(319): Tracy\DevelopmentStrategy->renderBar() #8 [internal function]: Tracy\Debugger::shutdownHandler() #9 {main} My server is on FreeBSD 14, PHP 8.3, MySQL81 pwFunctions should be defined somewhere?
  20. Hi. I have from Tracy some strange error : Error: Call to undefined function token_get_all() in /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php:337 Stack trace: #0 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php(118): TracyPwApiData->getFunctionsInFile('...') #1 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/includes/PwApiData.php(25): TracyPwApiData->getProceduralFunctions('...') #2 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/TracyDebugger.module.php(3082): TracyPwApiData->getApiData('...') #3 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/panels/ConsolePanel.php(154): TracyDebugger::getApiData('...') #4 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(143): ConsolePanel->getPanel() #5 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(115): Tracy\Bar->renderPanels('') #6 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Bar/Bar.php(89): Tracy\Bar->renderPartial('...') #7 /usr/local/www/apache24/data/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/DevelopmentStrategy.php(123): Tracy\Bar->render(Object(Tracy\DeferredContent)) #8 /usr/local/www/apache24/data/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.10.x/src/Tracy/Debugger/Debugger.php(319): Tracy\DevelopmentStrategy->renderBar() #9 [internal function]: Tracy\Debugger::shutdownHandler() #10 {main} How to solve this ? Thanks for answer. Pavel
  21. OK. Thanks for notice. I will try to find some logs. I wanted to just try your module. I will use Form Builder from Ryan, but your module also appears interesting.
  22. Hi. Thanks for you answer. I did not have any chance to do more, because whole system had problem immediately after installation. After I clicked on settings of your module, it was after few moments stuck in loading and loading...... So after circa 10 minutes I canceled all and restarted mysql and apache + php. Then after login to administration of PW it happened again... So finally I had to restart whole HW I had to check configuration of mysql and reinstall it because there was some strange damage to its install... In logs was only that MySQL shutted down and no extra info more... What do you think of it ? Pavel
  23. Hi. Today I installed your module on latest DEV PW HW is FreeBSD14, PHP 8.3.1(PHP-FPM), MySQL8.1, 32GB RAM, 8-core CPU After install of your module RAM of server was suddenly from 10% to 95% and whole system was unstable. Do you have any problems with your module like this ? Is PHP 8.3.1 supported ? Thanks for answer Pavel
  24. Hi. I really like this options in date ranges. I do not know if my question is right, but I will explain here, so it will be nice to have some info from your if what I want is possible. I have customer with restaurant and he has from me whole site and I used Form Builder Pro from Ryan for reservations. That customer has requirement to disable specific days which are visible in data picker. For example he wants to disable every Sundays and Mondays and some public holidays. On these days his restaurant is closed and thus not available for reservations. Is it possible with that new Date ranges ? What do you think ? Thanks for answer
  25. Thanks for your answer and explanation. I certainly will use PW and now I clearly know that your modules are also very usable in my project.
×
×
  • Create New...