manlio
Members-
Posts
148 -
Joined
-
Last visited
Everything posted by manlio
-
Thank you Adrian! You were really helpful. Have a nice day
-
Thank you all for your incredible support and for confirming that save in dB or in session variables is the good way to follow. If I choose the "save to pages" route, I am not sure how to plan the creation of the page. Should I create the page in the first step of the quiz and than pass the id page post variable to the following steps? In this way every time a guest refresh the first step of the quiz in the browser a new page would be created. Can this generate too many unuseful content and hit on server performance? Thank you again and sorry for the dump questions.
-
Hi to everybody. I'm building a short online quiz (10 questions - and for every question the page reload) and at the end of the quiz I need to present a summary of all correct and incorrect answers. Everyone can fill the quiz (the user doesn't need to be logged in and so any guest can access the quiz) and I would like to know if there is an easy way to store all the data so I'm able to read them at the end of the quiz. I tried to pass all post variables but I find it complicated because I need to pass everytime a lot of data, How could I store the data as PW pages and delete unnecessary data as soon as the process is finished? Is this a good idea? Thank you
-
Thank you Tom, I am on the same server so no problem.
-
Thank you Tom, partially you replied to my question because I learned a new interesting approach. Thanks! I think would be useful also to see other approaches. For my specific question, do someone think it is a safety issue? Thanks
-
Hi! I have a stupid question. Usually I leave ajax called files outside PW, but in the case I wanna leave them in the templates folder which is the best approach to use? Is it safe to create a unique template that can be associated for every ajax called file (for example based on template (sanitized) title)? Just to explain it better, I could create a template like (simplified version) $path = $page->title; $include ("$path"); and create a new page with this template for every ajax called script (changing accordingly the title). Tthank you!
-
Just as reminder for others. In my case inline editing in PW 2.8.35 don't work, updating to PW 3 fix the issue (although I prefer remaining on 2.8). Thanks adrian for your always present support.
-
Thank you very much Robin S I will try without using sub selector. For the second problem ok! I read better the documentation and I think I need to target every language. Thank you!
-
Thank you Robin S. I had tried before this approach but I receive this error Unknown subfield: name11658 When I used in a selector like this template=mysubcategory,pageref_category.name{$user->language->id}=$urlSegment1 //pageref_category is a multiarray page field type) So I tried a different not elegant route that uses directly title. Before putting into the selector I convert the dashes into spaces $urlTitle1 = str_replace("-", " ", $urlSegment1); //convert dashes into spaces //the selector becomes something like template=mysubcategory,pageref_category.title=$urlTitle1 Now everything seems to work although maybe I can have new problems if the title has to remain the same in different languages. Anyway now I ahve a new problem (or maybe I'm tired ) I have a multiarray page fieltype and I'm using alternate multilanguage fields. The problem is that when I use this $selector = "template=prodotto,pageref_categoria.title=$urlTitle1"; $items = $pages->find("$selector"); although the user changes language, it continues to filter data based on pageref_categoria default language.... Maybe I need a rest
-
Language-alternate field display issue
manlio replied to alexcapes's topic in Multi-Language Support
I don't know why but it happens also with 2.8.35. -
Selectors, Multilingual, UrlSegment & localName
manlio replied to swampmusic's topic in Getting Started
Thank you for your reply! -
Selectors, Multilingual, UrlSegment & localName
manlio replied to swampmusic's topic in Getting Started
Hi swampmusic, I stumbled in the same problem. I need to use localName($user->language) in a selector. Did you find a solution? -
Thanks to this post I discovered that I can access local names in this way $item->localName($user->language) Now I just need to understand if it is possible to do the same thing in a selector to filter the results. EDIT: I have just found that I'm not alone
-
Ok Wanze thank you! As I suspected is an intended behaviour. In this case, I don't need to get the full url because I have to rebuild a "fake" URL. I'm filtering records based on Urlsegments and names. I think that I can solve the link problem using something like //instead of echo $page->url.$item->name // I can use echo $page->url.sanitizer->pageName($item->title) but now I have a new problem when I arrive in the destination page where I filter records like this $pages->find("template=mytemplate,pageref_category.name=$urlSegment1"); //now this doesn't return anything because it is comparing something like "prima-categoria" with "first-category" My new question is : How can I properly filter records based on every languages? Is there any alternative still using Urlsegments? Thank you for your help.
-
Yes I have set different names for each language. As a test I tried with $item->title (also translated) and it works.
-
Hello, I have a problem and I'm not sure if it is an intended behaviour or not. I'm building some url with something like echo $page->url.$item->name but the $item->name remains the same in every language although is translated. In my mind I was thinking it automatically changes based on language, but this doesn't happen. Is this a normal behaviour or am I missing something? Thank you
-
Thank you adrian, your reply is still helpful because I started working on other things and I didn't find time to investigate more on this (it is not mandatory). I have added the script in the header and now the error message has changed in Uncaught TypeError: Cannot read property 'plugins' of undefined at ckeLoadPlugins (InputfieldCKEditor.js?v=157-1475222106:17) at InputfieldCKEditor.js?v=157-1475222106:22 ckeLoadPlugins @ InputfieldCKEditor.js?v=157-1475222106:17 (anonymous) @ InputfieldCKEditor.js?v=157-1475222106:22 Thank you as usual for your amazing support. As soon as I can work on this I will try to remove some javascript to see if something change.
-
Hi! I have a problem using front-end editing PW capabilities. I'm using the latest legacy version and I have enabled it, but when I'm in frontend (logged as admin) I get this error in Chrome console Uncaught ReferenceError: ProcessWire is not defined at ckeLoadPlugins (InputfieldCKEditor.js?v=157-1475222106:17) at InputfieldCKEditor.js?v=157-1475222106:22 I tried to disable some modules but it still doesn't work. Anyone have a suggestion how to fix this problem? Thank you!
-
Prevent script interruption while importing files
manlio replied to manlio's topic in General Support
Wow guys you're awesome! My file are online. I will try tomorrow morning. Thank you!! -
Sorry for the dumb question, but I'm importing some external files into a file field using something like this (it is simplified and $fileurl is changing for every item) foreach ($items as $item) { $item->scheda_tecnica = $fileurl; $item->save(); } The script works perfectly but when there is a missing or wrong URL the script stops. I would like to complete the task and echoing the item that caused the problem. How can I manage this kind of error? Thank you!
-
Thank you @mel47! I didn't think about this. Now I started import data using API and @Sérgio indications, but next time this will be very useful. Have a nice day
-
Thank you Sérgio I will give it a look.
-
Thank you Harmen for your help, hope someone else has an alternative smart idea .
-
Hello! I would like to know which is today the best way to import multi language CSV into PW (for example multi lang titles). I have used import CSV and Batch Child Editor in the past but I think they both doesn't import into multilanguage field. Thank you!
-
Post removed because I fixed it and wasn't a mailgun problem.