Jump to content

virtualgadjo

Members
  • Posts

    273
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by virtualgadjo

  1. hi, id 27 is the default id of http 404 error page thus you don't need to "tell" this to your config file samething for the index.php thing in the htaccess file in that same htacces file, you can see an intersting link to a blog post about optimising your 404 error https://processwire.com/blog/posts/optimizing-404s-in-processwire/ but in your case, the first thing i would check is - is the 404 page not found page still in the page list - if yes, do you still use the basic-page template for the 404 page and - if so, have you used the basic page template for something else and then modified the php code in a way that may generate redirection or anything that the 404 page may not be using (fields or else) you could try creating an empty template, set it as the 404 page template and try to see if the problem persists (remove the config 404 id line that is not useful if you use the default pw page :)) hope it helps have a nice day
  2. Hi, you're right, if you want a page to be displayed on the front end it needs a .php template (be this template used by one or several pages) the reason is very simple, this template is used to "echo" the content you want to see, surrounded by your html markup you'll see that pw allows several ways in the coding field and as you said, doesn't get in your way, actually, it behaves a lot like a framework offering multiple template systems have a nice day
  3. hi, just my two cents ? whatever system you're on, have a look at your source code, if ever any image or content is in the source linked from an http:// (not https://) src, your browser with display an not protected error near the url an outgoing link will not cause problem have a nice day
  4. hi, answering to myself, yes, - a little late i know but in the meantime i've made many people happy with their new website in pw - and i know it may sound a little strange but in case in may help someone else looking for the same thing, i've found a funny way to do what i was looking for apparently the easiest way to do this would be to install pw last release, install language support of course ans then go to the language settings, default language, select all the wire files to translate, submit, save and then... copy paste all the labels in the text inputs, this generates a full and filled default language json files pack now, wriggling on my chair waiting for the next prod release, in the starting block to make a full french translation ? i know this may sound funny but there may be some other silly old guys like me that still love working in text files, so, i this can help them ? have a nice day
  5. Hi, don't worry, answering myself again and again is not going to be an habit ? just here to say actually the problem is not being in debug mode or not, the error message is in fact a notice, probably due to the fact that created is everywhere else a datetime (a true one) and is somewhere considered as one on insert (still couldn't find where... no mention of datetime in the module file nor in the form file...) even if for comments it's an int... so far, on the production server, notices are not displayed so i'll leave it as it is until i find some time to insert comments in my own way but continuing to use pw fieldset as everything else works like a charm, moderation, displaying and so on just hope there won't be millions of comments else the errors.txt file in the logs folder will take a lot of room ? have a nice day
  6. hi again, i thinks i've found out the problem, the quey that inserts the comment uses the date timestamp as a string what upsets pdo as it ends in an int field now, i'm still searching for where this happens ? have a nice day
  7. @sirhc good even if funny solution ? you'll just have to set the blog config file httpHosts to www.thesite.com/blog if not already done and be careful with your base href for the blog part as the simple / won't work for its own install assets ? have a nice day
  8. @sirhc ah ok i understand... you know that, in this case, you'll loose a lot of the SEO work you were speaking about if i had a customer asking for the same kind of thing i would have tried to convince him/her/them to do the opposite, the website and the blog in a pw install and, when ready, a link to the app from pw menu, this way they could have worked without breaking anything, SEO included but i know clients are not always that easy to convince... cheer up ?
  9. @sirhc i can't find a fainting emoticon ? but, nevermind, i'll say it anyway, except if the main website is going to be a huge magento e-commerce website, why an other cms ? is there anything it will have to do that pw can't do ?
  10. bernhard was faster than me ? and he is right too ?
  11. Hi, honestly, i wonder if your not over complicating your life here ? if your website is going to be example.com with a blog which url will be example.com/blog why don't simply have one install in the main directory and set a page name... blog the only reason i can imagine is that the blog editor may not have the same admin rights as the "main" site ones, well, it would be far simpler to do this with user profiles... one more reason for this will be all the work you're going to have when dealing with possible common content between the web site and the blog, i.e. three last post on the home page, in one install, it's just fingers ine the nose, with two, you'll have to deal with the connexion to another db, and so on hope it helps have a nice day
  12. Hi, i'm currently working on a blog for a friend, using comments, everything works fine except that, locally, in debug mode, in the admin after submitting a post, i've got this error FieldtypeComments: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1618466849' for column 'created' at row 1 pw 3.0.165 on php7.3.21 what's even funnier is that, in the db, the created column is an unsigned int (the value is correct), the timestamp is here and, of course, displaying the comments on the front end works fine too, the date being well formatted as set in my config call ('dateFormat' => 'd/m/Y H:i',) the only explanation i can imagine is something PDO doesn't like for the insert call from a fieldtype created in the mysqli area ? but i'm still wondering where and why as... it works ? as always, any insight, idea or advice would be very welcome ? have a nice day
  13. Hi, that's where comes, once more, the beauty of pw... something you can easily do, just create a hidden page, let's say "sliders" (can use an template without file) this page will have children using a template without file too, template to which you'll just need to associate the repeater used to create your sliders elements and this is where the magic comes, Hannacode! create yours, something as easy as [[slider id=123]] or [[slider name="xxx"]] id being. the id od the page containing the slider, name... well guess ? and where you want your user to be abble to use them, just add TextformatterHannaCode to your ckeditor; job done, it works a little like wp shortcodes but; a little difference, it works, it lets you write and use the code you want without generating hundreds of html/js/css lines in the page, it won't be broken by some update and it's fast as hell i let you decide where and how to tell your user what code to use, personally, i use kogondo's https://processwire.com/modules/fieldtype-runtime-markup/ it makes easy to add an easily selectable piece of code inside a readonly input in the backend, live example for a customer who wanted to be able to create carrousels and use them anywhere in any page if french, sorry, but you get the idea and, below, there is... a title and a simple repeater, the user has just to add a p in ckeditor, paste the code and hannacode takes care of what's left to do ? hope it helps have a nice day
  14. Hi, honestly, i've build a lot of sliders in websites with pw, depending of what you're using as js, there are a lot of plugins out there, vanilla, jquery or zepto (i love the vegas one that runs with jquery or zepto ? ) simple ones are even easy to build self made with vanilla js when it comes to a simple admin for it, depending of what you're going to do, image slider with just a simple legend/text, an image field will do the job using the description for the text part if you want to go a little further, just use a repeater... image field(s) in each item, text, richt text, you'll not run into any limit in both cases your user can order the slides dragging the items with their mouse, hard to find something easier ? have a nice day
  15. Hi, sorry if it sounds like a silly answer ? but, of course, i guess you have allowed svg format for your image field if so, have you tried using the svg sanitizer module https://processwire.com/modules/file-validator-svg-sanitizer/ and of course have you checked your svg source code, i use svg a lot and, when using them for a web page, i often have to simplify the xml code, getting rid of a lot of non useful code... just in case ? have a nice day
  16. done ? and i would have been surprised you'd missed something obvious ? have a nice day
  17. hi, honestly, being a little bdd obsessive, in this case i would use a query to retreive from the "pages" table the pages where parent = 7 order by modified desc for example the funny thing is in this table, deleted pages new name is their id followed by their parent id, useful to restore them with the right parent... don't know if it is a very pw way to do things ? maybe a hook to have template 2 sorting its children by modified desc when page id is 7... have a nice day
  18. hi, having ran into the same kind of problem in a repeater, i've found out that the solution, when in a repeater, is to set CKE as an inline editor (field tab in the field config) and everything went back ok hope it helps have a nice day
  19. @alexmercenary my pleasure ? have a nice pw day
  20. Hi, it sounds like you are correct ? the docs say "Matches whole words only" and these different results between your hosts could come from a "little" less accurate use of full text in the older versions of php and mysql ? have a nice day
  21. hi again ? ok, now, i understand a little more the problem which is to have a single page displaying different contents depending on the form submission and, i can see two or three different easy ways to deal with this 1 - if the content if complex, not a simple content of a few fileds, you may have a cached page the chidren of which are the different contents you will display on the result page and, of course the way you choose what page content to display depends on what you prefer, it could be having an array/object storing something like result/page id or a field in each of those pages to store what result it matches 2 - if the content is not that big or complex, you could also have a repeater in the result page and code which one is to display depending on the form result the third one is one of my bad habits ? storing the results in a personal db table with a custom admin module/page to edit them and retrieving the result, once again, depending on the form result but, honestly, the more i work with pw, the more i tend to use its abilities to deal with different contents and data structure, i am in a slow personal table rehab process ? Have a nice day
  22. Hi, honestly, as long as you already have set the yes/no questions in the forms, i think it would be simpler (and a bit less confusing for the user) to calculate that match thing when dealing with the form post vars before displaying the result page, it would avoid you having to do twice the job ? have a nice day
  23. Hi, not sure i understand the question that well... but i'll try ? if what you want is to display the content of, say job 1 applications contents, its quite simple, you can use the $page->chidren() method to retreive all the children of the page you're on if the page you use to display job application is not the job page itself, just start with a method to get the job page example... you have a single page that will show all the applications for a job depending on a link from the job page itself on the job page (let's say job 1) make a link with something like job-applications/1017 on the job-application template, allow url segments and now, sure you've guessed, you can retrieve the job page children using that segment (you could use the page name instead of its id, prettier even if a little - very little - more code to retreive the page id using name and template but this is just for the example) $jobpage = pages->get(1017) $applications = $jobpage->chidren(); job done ? hope it helps have a nice day
  24. Hi, i'm not sure i understand the question that well but let me try the problem seems to be, you would like to have the localisation for each language in the url, for example as you said, xxx.com/contact xxx.com/fr/contact and this for all you pages if so, the solution is really simple provide you have installed the FieldtypeURLLanguage like Robin an kogondo said by default, the home page is the "mother" of all the other pages and, by default, the home page has no name in pw but has the name field usable then - leave it blank in the default language - in the other language(s) use whatever you want to set it's url (quite often the iso code will be the simplest) this way the home page url wil be - xxx.com in the default language - xxx.com/fr/ in french and so on for all the languages you use and the pages urls will be - xxx.com/the-page/ in the default language - xxx.com/fr/la-page in french for example this works if you have the same name in both languages too, xxx.com/contact => xxx.com/fr/contact hope this is what you were looking for ? have a nice daay
×
×
  • Create New...