Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by lpa

  1. Well, now it works. I was expecting a file to be generated in the root, but then I realised it is dynamic. When you access domain.com/sitemap.xml, it is generated on the fly. Now my only concern is if I check the "Include hidden or unpublished pages", are really all the hidden and unpublished pages included? If I have some pages hidden because they won't be in the main navigation, I would like those to be included in the sitemap. But never any unpublished pages.
  2. Yes, I found that out and it fixes the problem. But the next problem is that no sitemap.xml is generated and no options are shown in the templates settings for the sitemap.
  3. I tried to install this module for the first time, but it gives me this error, when saving the settings: Fatal Error: Uncaught TypeError: Return value of MarkupSitemap::removeSitemapCache() must be of the type bool, null returned in site/modules/MarkupSitemap/MarkupSitemap.module.php:257 And no sitemap.xml file is generated.
  4. Could you disable the rebuildAll() call for a moment in PagesParents.php, or would it break something? Will it rebuild the indexes after it would be reenabled?
  5. Yes I agree. But we are doing a big restructuring of our content and to have the redirections handled by PW page history, we are moving the pages using the API. Unfortunately we have thousands of pages to move to archive and it will take time....
  6. OK, thanks. And there seems to be no solution yet for this problem. Or how could I use transactions?
  7. I am having slow performance when moving pages to a new location using api. What could be the reason that moving one page takes 3-4 seconds with this code? I think it should move many pages per second. Could it be the page path history, that takes so long to save? $to = $pages->get('/path/to/'); $articles = $pages->get('/path/from/')->children(); $i = 0; $c = $articles->count(); foreach ( $articles as $item ) { $item->of(false); $item->original_category = $item->parent->title; $item->original_path = $item->url; $item->parent = $to; $item->save(); $i++; printf("%d/%d %s \r", $i, $c, $item->url); }
  8. I am using the DumpsRecorderPanel because I can't get the DumpsPanel showing up when trying to put bd() in PadLoper.module. What would be the reason when the Dumps Panel does not show up from a call in a module?
  9. Well, yes, it has over 300 items and some of those have array titles: How can I clean the cache of the DumpsRecorderPanel? Edit: Just found out how: removing the dumps.json in the TracyDebugger cache.
  10. The whole dump is like this: ErrorException: Array to string conversion in ../www/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Helpers.php:80 Stack trace: #0 ../www/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Helpers.php(80): Tracy\Bar->Tracy\{closure}(8, 'Array to string...', '/Users/lpa/www/...', 80, Array) #1 ../www/site/modules/TracyDebugger/panels/DumpsRecorderPanel.php(24): Tracy\Helpers::escapeHtml(Array) #2 ../www/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Bar/Bar.php(149): DumpsRecorderPanel->getTab() #3 ../www/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Bar/Bar.php(122): Tracy\Bar->renderPanels('') #4 ../www/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Bar/Bar.php(98): Tracy\Bar->renderHtml('main') #5 ../www/site/assets/cache/FileCompiler/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Debugger/Debugger.php(313): Tracy\Bar->render() #6 [internal function]: Tracy\Debugger::shutdownHandler() #7 {main} I think it is now shown up as soon as the panel is loaded. How could I find out the $s value?
  11. Hi When trying to use DumpsRecorderPanel, I get the following error: ErrorException: Array to string conversion in .../www/site/modules/TracyDebugger/tracy-2.8.x/src/Tracy/Helpers.php:80 What might be the reason for this? What can I do to further debug? Tracy version 4.22.11 and PW version 3.0.179. PHP 7.2.21 on MacOS.
  12. Great, the UnorderedListToPages Action did just what I needed. Is that Import Media action available somewhere is just in your custom use?
  13. I tried to find info on how to import a page hierarchy with Batch Child Editor: FirstLevel1 FirstLevel1/Child1/ FirstLevel1/Child2/ FirstLevel2 FirstLevel2/Child1/ FirstLevel2/Child2/ Is this possible, or should I first create the first level-pages and then import the second level pages one parent at a time?
  14. Hi Should it be possible to set fields value empty with this "Field Set or Search and Replace" -action? Now I get an error of a missing required value.
  15. lpa

    Auto Smush

    You should ask reSmush.it to add this plugin on their front page! ProcessWire would get more users.
  16. Thank you for you suggestions. I think i was not clear enough. I know how to translate ProcessWire with language files or how to translate code with translatable strings like __('read more'), but now I should send the content in the title and body fields of my site to the translators. I can't figure out how that would be exported to JSON files and then imported back.
  17. I have a site that will have content translated by a professional translator. I am requested to send the source language content to the translater as some files. The suggested format is .xliff or .wordpress. I couldn't find any information that ProcessWire would support exporting content as xliff, xml, json or any other format that could be then imported once the translation is completed. Does anybody have any solution for this kind of translation exchange format?
  18. I have two questions: 1. Why does this code: $content .= $img->render([ 'alt'=> $img->name, 'height' => $img->height, 'width' => $img->width, 'srcset' => '883, 687, 369', ]); generate this where I have the portrait sizes setting even though I haven't set the portrait mode on? <img src="/site/assets/files/1185/image.691x499.jpg" alt="image" srcset="/site/assets/files/1185/image.369x266-srcset.jpg 369w, /site/assets/files/1185/image.687x496-srcset.jpg 687w, /site/assets/files/1185/image.jpg 883w" sizes="(orientation: portrait) and (max-width: 768px) 50vw"> How is the portrait mode set on? I think, it needs 'portrait' => true or srcset('true') 2. render should extend PageImage::render, but the width or height attributes don't remain in my code with the above example. Why is that?
  19. I tried to add the page id to be searchable in the admin Ajax search-field. The help message says the field has to be text-based: "Enter the names for one or more text-based fields that you want to search, separating each by a space." Is there any way to add the page id to be searchable?
  20. Well, it seems to work if I leave the parent of the subtree documents to the old path like this: Move the subtree under the new parent path2: /path1/subtree1/article1/ -> /path2/subtree1/article1/ article1 (path: /path1/subtree1/article1/) is redirected to /path2/subtree1/article1/ if /path1/subtree1/ is not removed. If that is removed, /path1/subtree1/article1/ is shown in the browser address even though the page shown is /path1/subtree1/. And no 404-error is shown even though the page /path1/subtree1/article1/ does not exist any more.
  21. Thank you for the suggestion. I know we could do that and maybe we do. But if we still need to keep something under /canines/, that option won't work. And if the moves of the documents are done by editors, they don't know about or have access to redirect rules in .htaccess.
  22. I have a need to move a whole subtree of pages at once to another path. I would like the Page Path History -module to take care of the redirection of the old path locations to the new parent. But it seems to me that I have to move every single page individually for the move to register in Page Path History. Should this module handle the whole subtree or just the top level? Do I need to move the pages using API for the history to save with the move?
  23. I would like to replace the Ryan's original MarkupGoogleMap with this module. I installed this MarkupLeafletMap and tried to change the Map Marker fieldtype to Leaflet Map Marker. But it seems these fieldtypes are not compatible with each other. What should I do to change the old field with its over 200 pages to use this fieldtype?
  24. @adrian has a great support on his modules! All the problems solved with his help a long time ago! Thank you very much! And this module is great for cases where the PW template based access rights scheme is not so flexible.
  25. You can find my other message on the issue here on the HelperFieldLinks thread. It is supposed to give quick access to the templates and fields for superusers.
  • Create New...