Jump to content

lpa

Members
  • Posts

    209
  • Joined

  • Last visited

Everything posted by lpa

  1. How could I define that the subfolders of a page are shown first and the children of the page then in the admin page tree? Now the children are shown first and if there are many pages inside a folder, the subfolders are shown on the last page.
  2. The articles are edited in an editorial system and we only want to preview them before they are finally ready to be published. Bernhards advice on using Nette was the chosen solution for us.
  3. This is a journal site where the content of articles is edited in an editorial system. The writer wants to see the preview of the article during the editing phase. The article is saved to the site only when it is ready to be published. We don't want the article to be saved before it is ready to be published.
  4. We need to create a preview of a page with data retrived through an external api without saving the page. The page consists of text, images and embeded HTML-items (youtube video, twitter feed-item etc). The preview is never saved as a page as it is only for preview purposes. Is it possible to create a new PageImage object in the memory, do cropping and resizing and show the new manipulated image on the preview page purely in memory?
  5. 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.
  6. 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.
  7. 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.
  8. 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?
  9. 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....
  10. OK, thanks. And there seems to be no solution yet for this problem. Or how could I use transactions?
  11. 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); }
  12. 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?
  13. 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.
  14. 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?
  15. 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.
  16. Great, the UnorderedListToPages Action did just what I needed. Is that Import Media action available somewhere is just in your custom use?
  17. 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?
  18. 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.
  19. lpa

    Auto Smush

    You should ask reSmush.it to add this plugin on their front page! ProcessWire would get more users.
  20. 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.
  21. 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?
  22. 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?
  23. 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?
  24. 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.
  25. 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.
×
×
  • Create New...