Jump to content

rooofl

Members
  • Posts

    91
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by rooofl

  1. I sloved my issue by removing the affected page field and building it again with the module Connect Page Fields
  2. Hello, when I try to edit some of the older pages of my website, the admin page returns the following error: Fatal Error: Uncaught Error: Call to undefined function wire() in /home/rbastide/externe/usemodify/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module(305) : eval()'d code:4 Stack trace: #0 /home/rbastide/externe/usemodify/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module(305): eval() #1 /home/rbastide/externe/usemodify/wire/core/Wire.php(383): ProcessWire\InputfieldPage->___findPagesCode(Object(ProcessWire\Page)) #2 /home/rbastide/externe/usemodify/wire/core/WireHooks.php(733): ProcessWire\Wire->_callMethod('___findPagesCod...', Array) #3 /home/rbastide/externe/usemodify/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\InputfieldPage), 'findPagesCode', Array) #4 /home/rbastide/externe/usemodify/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module(359): ProcessWire\Wire->__call('findPagesCode', Array) #5 /home/rbastide/externe/usemodify/wire/core/Wire.php(383): ProcessWire\InputfieldPage->___getSelectablePages(Object(ProcessWire\Page)) #6 /home/rbastide/externe/usemod (line 4 of /home/rbastide/externe/usemodify/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module(305) : eval()'d code) This error message was shown because: you are logged in as a Superuser. Error has been logged. I have no idea how to solve it, as apparently, this is not related to my template directory. [Edit]: I think I remember having changing something a while ago, a hook maybe, to make the page fields relations both way. Now it doesn’t work and the problem above appears when I create relations between some pages. I am stuck because I can’t change those relations in the admin edition page.
  3. That was the problem! Thank you Soma.
  4. Hi! Everything work as expected with my configuration of the Multisite module : $config->MultisiteDomains = array( "foo.com" => array( // domain name can be used to map to root page "root" => "/ml", // page name for the root page "http404" => 27 ), "law.foo.com" => array( // domain name can be used to map to root page "root" => "/law", // page name for the root page "http404" => 27 ) ); …except when I try to loop over pages: $siteRoot = $page->rootParent; $parent = "/".$siteRoot->name."/projects"; $projects = $pages->find("template=project, parent=$parent, sort=sort"); foreach($projects as $project){ $firstimg = $project->images->first->width(1000); echo "<a href='{$project->url}'><img src='{$firstimg->url}'></a>"; } The code below outputs a list of links that targets foo.com/ml/projects/post-title foo.com/law/projects/post-title instead of foo.com/projects/post-title law.foo.com/projects/post-title What am I doing wrong?
  5. Hello, I get often logged out from a web service built with PW. This web service has a large database and I use ListerPro to let my client browse and interact with it. After a couple of manipulations, or around 2-3 minute after logged in, the login page appears again. In this process, the last data submitted in the admin get often lost. About my configuration: The website is hosted on one of the first plans of OVH server (cheap ones), can it may be related to the problem? I uninstalled all the extra modules I used (Redirect, AdminCustomFiles). Nothing changed. The problem appeared recently only (since around 4 days) The website is still using basic http There is nothing interesting neither in `site/assets/logs/errors.txt` nor `site/assets/logs/modules.txt` I sometimes get the red error `This request was aborted because it appears to be forged.` together with `The process returned no content.` after a login attempt. I saw on this forum that it can be related to access rights and checked a couple of files permissions, and I *think* everything is fine. Thanks in advance for your help.
  6. Thank you both for your answers. The problem solved itself after a day, I guess it is related to a cache issue.
  7. Anyone for this issue? Thanks in advance
  8. Hello, I moved my project from /dev to / on my server and changed the /dev to / in the database. Now the url of the main admin nav bar (page, setup, modules…) still point to /dev. The front end of the website is not affected, neither the admin page tree. I first thought it was related to the cache as it appears I don’t have tracks of /dev in my database anymore. Can you help me to locate where to update those old URLs?
  9. I am trying to make this module work, but I am stuck with this message: Uncaught ArgumentCountError: Too few arguments to function Pages2JSON::___getFields(), 0 passed in …/site/modules/Pages2JSON/Pages2JSON.module on line 182 What did I make wrong? $term = "update"; $results = array(); $limit = 3; $selector = "title*=$term, limit=$limit, template=entry"; $results = $pages->find($selector); header("Content-type: application/json"); echo $results->toJSON(); exit();
  10. @adrianThanks for this useful module! Can you confirm it doesn’t work in repeaters fields? Can you suggest a workaround?
  11. I also have troubles to make it work with 1400+ page deletion. I have no error, and the pages are still there after execution of the script. It works if I have less result (e.g. if I filter id>1000,template=mytemplate) The issue seems to be related to the high amount of results.
  12. Thanks a lot for your clarification, that works perfectly.
  13. Hi, thank you so much Ryan for this amazing module. It helps me a lot. I have in my .csv a column for countries: (France, Germany…). I would like those countries name to be imported as sub-pages of a “Countries” pages, with a template “country”. The page field “country” allows pages to be created from it. I learn in Nik’post that such pages could be associated automatically (if I understand it well), but is it possible to create it from the .csv? If I try to associate my csv field to the right PW field I get: ImportPagesCSV: Unable to import page because it has no required 'title' field or it is blank. Any idea to help me solve my problem?
  14. Thank you LostKobrakai, it works perfectly by testing count(), my final code is: $news_list = $pages->find("template=news, sort=name, show_in_slide!=1"); if ($news_list->count()) { echo "There is at least one news not shown in slide"; }else{ echo "All news items are shown in the slide"; }
  15. I still have trouble to find how to solve this issue, can anyone help me?
  16. Thank you for your quick replied, but none of the solutions seams to work. Let me correct my first post: In the case the condition should display “no news”, it displays “There is at least one news not shown in slide”, and not nothing as I wrote before. Sorry for this confusion.
  17. I try to display all the pages `news` with a checkbox `show_in_slide` unchecked. Here is my code: $news_list = $pages->find("template=news, sort=name, show_in_slide=0"); if ($news_list) { echo "There is at least one news not shown in slide"; }else{ echo "No news"; } This works if I have such a news, but “There is at least one news not shown in slide” appears also if it is not the case. What I am doing wrong?
  18. Many thanks for your replies. This issue was due to a hand crafted function using substr(). I used mb_substr() instead and it solved the encoding issue!
  19. I have trouble to render special characters with a textarea field: once special characters are entered in the textarea field (eg: å), it appears as � on the website. This textarea is a character map for a type showcase, so I need UTF8 support, my HTML header is set to charset=utf-8, what do you think?
  20. Oh, sorry for that and thank you for your time! You made me realize that I was a bit late in term of PW versions. I have a fresh one now, thanks again.
  21. Horst > I try both to upload manually and from the module installer. The error happens when I check for new module or when I proceed to installation. My php version is 5.6.10. I noticed that the error exists on my distant server as well. It blocks the access to the module page until I manually remove PIA. Edit: and ProcessWire 2.4.0
  22. Hi horst, thank you for this great plugin. I can’t install it on my new Processwire website. When I come to activate the plugin, I get the following error: Class PageimageAssistant contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Module::getModuleInfo) in /…/site/modules/PageimageAssistant/PageimageAssistant.module on line 738 Any idea?
  23. Solved! Thank you all. My code is: keyword.php: $fonts = $pages->get("/fonts/"); $filter = "keywords=$page"; include("./fontlist.inc"); fontlist.inc $fontlist = $fonts->find("$filter,limit=6, draft=0, sort=-created"); $pagination = $fontlist->renderPager(array( … This way it allows me to set limit, draft, and sort in the font list template whatever the filters. @diogo I am really glad you use and like my projects! It is always a pleasure to see that my work can be useful. Thanks to you, Use & Modify will have keyword pagination bug free!
  24. @LostKobrakai As you can see in this demo the home page pagination works fine with $pages->get("/fonts/"), I must admit I don’t know why exactly. Here is the code of my home page (working) and the one for my pagination, finally the code of the keyword page. I am open to any other solutions, idea or examples, as I am not an expert, maybe I missed something.
  25. Hello, I want to paginate my keyword = value pages. This works well when I only paginate those pages: $fonts = $pages->get("/fonts/") But it stops working when I try to paginate $fonts = $pages->get("/fonts/")->find("keywords=mykeyword"); My pagination code looks like: $fontlist = $fonts->find("id>1, limit=6, draft=0, sort=-created"); $pagination = $fontlist->renderPager(array( 'nextItemLabel' => "▶", 'previousItemLabel' => "◀", 'linkMarkup' => "<a rel='prefetch' href='{url}'>{out}</a>")); echo $input->pageNum; foreach($fontlist as $font){ … “Allow page number” is checked on both fonts ant keywords templates.
×
×
  • Create New...