Jump to content

virtualgadjo

Members
  • Posts

    222
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by virtualgadjo

  1. hi, honestly, i doubt anything in the index.php file will change anything as in the case you describe you don't get the right one... instead i would try something in the htaccess file, something like <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 </IfModule> but even this, i'm not sure it will work for a client browser cached file as it will even not have a look at what happens server side before serving the page... have a nice day
  2. Hi, huh, this is really weird, first thing that i can say for sure, the htaccess line you quote has nothing to do with this, i have many pw websites and the 404 page works fine without touching anything in the htaccess file, even changing its slug (http404) for something a little less geeky and a little more frenchy ? (and quite often with a custom template file too) the only case i can imagine in the htaccess file would be a multilingual website with multilingual slugs for this page, some containing non ascii characters, if using point 14 in the htaccess file after having changed the default slug, you may need to change it in this section too except for this really particular case, i can't see where the problem could be without having a close look at your own code, if i were you i would start with - _init.php, init.php, ready.php files if you use any of those, do you use any regex, hook, custom redirection or else that could cause an issue for pages that don't need any - header or _main.php (i'm a great fan of markup regions :)), same reasons etc, actually, any kind of code you've written, php or js, that is supposed to work on every page. if you have any, exclude the 404 page from its execution and see if it changes something hope you'll find something out... have a nice day
  3. Hi, maybe you could try the htaccess directive on top of your root htaccess file php_value date.timezone 'America/Chicago' some servers may sometimes be php resistant ? in case it helps have a nice day
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. @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
  11. @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 ?
  12. @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 ?
  13. bernhard was faster than me ? and he is right too ?
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. done ? and i would have been surprised you'd missed something obvious ? have a nice day
  20. 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
  21. 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
  22. @alexmercenary my pleasure ? have a nice pw day
  23. 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
  24. 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
×
×
  • Create New...