Jump to content

kongondo

PW-Moderators
  • Posts

    7,479
  • Joined

  • Last visited

  • Days Won

    146

Everything posted by kongondo

  1. @Macrura, Thanks for catching this. You will notice the same error if you tried to rename a FieldtypeConcat field. The error occurs because these Fieldtypes do not create a database table, i.e. there is no field_my_runtime_field table. MySQL throws the error since it can't find such a table on file, i.e. there is no field_my_runtime_field.frm file (every MySQL table is represented on disk by a .frm file that describes the table's format). It throws the error in Fields.php, in the __save() method, here. Although the method is hookable, I'll have a talk with Ryan to see what's the best way to handle this. Edit: Forgot to provide a temporary solution: As we know, the names of fields themselves are stored in the 'fields' table. As we wait to resolve this, we can always change a fields name there. Not ideal, I know, but we will get to the bottom of this. Edit 2: Issue fixed in this commit in ProcessWire 2.7.2 (dev)
  2. Planned for version > 1, maybe 2nd release
  3. Thanks, might just do, considering my growing issues list. I also have @jlahijani list of ideas to consider.
  4. Drag and drop to sort or to upload? Both are already implemented
  5. Simplest way I can think of is to use PHP substr and strip_tags. The latter is very greedy so you need to tell it what to avoid [allowable tags]...(it get could messy very quickly). Anyhow, this is how we do it in the Blog module using those two PHP functions.
  6. @Macrura, Glad you liked it. Like I hinted in my first post, your custom menu idea was one of my inspirations, so thank you too . It still needs some work and re-factoring but time is my worst enemy (currently? always? ). Let us know how you get along.
  7. Rather than reinstalling and reimporting from your old database, you can do the following: Do not test this on the production server, obviously Back up the database of your current Blog install Import your backed-up database into a fresh Blog install on your local/test server. This Blog install should not have 'Schedule Pages' installed (just to better illustrate the steps below) Check that this test Blog works fine OK, now the fun part. Install and configure the module Schedule Pages. If you do not yet have LazyCron installed, ProcessWire will complain that it cannot install Schedule Pages since a required dependency is missing. LazryCron ships with ProcessWire so, in that case, head over to modules -> install to install it. The module 'Schedule Pages' will create two fields with the names 'publish_from' and 'publish_until'. Give them appropriate labels if you wish, e.g. 'Auto-publish from' and 'Auto-unpublish on' respectively. Make sure you read the module's usage notes (e.g. that you need to confirm LazyCron is working properly on your server) Add the above two fields to the template 'blog-post' and save. If this had been done via the Blog Install Wizard, these fields are placed at the very top of the list of fields on this template, just above the 'blog_date' field and given a width of 50%. OK, off to the database we go. In phpMyAdmin or similar, go to the ProcessWire database where you have your (test) Blog installed and find the table 'modules'. In that table, looking into the 'class' column, find the row 'ProcessBlog' (see screenshot below). In the column 'data' you will see saved Blog configurations (see example code below). Find and edit the entry 'schedulePages'. In your case it should be empty and looks like this: schedulePages":"". Modify it to be like this: schedulePages":1. That 1 tells Blog that use of 'Schedule Pages' is true. If using phpMyAdmin, it has inline editing (double click on what you want to edit and make your edits and mouse out to save) In your Blog's Posts Dashboard, under 'Quick Post' You should now see two entries 'Publish from' and 'Publish until'. When editing/creating a post, you should also see the two fields that you added to the 'blog-post' template. Create (but do not publish) a Test Post to test auto-publishing/unpublishing at the dates you set. Note that since the module 'Schedule Pages' uses LazyCron, it needs a browser visit to trigger it. Visit your post (in the frontend, in a different browser where you are not logged in) at a time near its scheduled auto-publish time. You should get 404. Reload your browser some time after the auto-publish date and you should see your 'Test Post'. You are done database blog config database blog config without 'schedulePages' enabled {"blogFullyInstalled":1,"blogStyle":"1","schedulePages":"","commentsUse":1,"templateFilesInstall":"2","tagTemplatesFields":"blog","blog":1020,"blog-posts":1021,"blog-categories":1022,"blog-tags":1023,"blog-comments":1024,"blog-widgets":1025,"blog-authors":1026,"blog-archives":1027,"blog-settings":1028,"blog-asc":1032,"blog-dnc":1033,"blog-dc":1034,"blog-rposts":1035,"blog-rcomments":1036,"blog-broll":1037,"blog-tweets":1039,"blog-pauthor":1040}
  8. @BernhardB, yes, I have considered it. Will look further into it, thanks.
  9. kongondo

    Macaw

    Tell me about it. I opened Macaw and got a headache straight away .
  10. Not wild not silly... Yes, you are covered ...but currently only audio + video. Documents are trickier, except for PDF. Still mulling using a different jQuery plugin vs fancybox?
  11. Getting warmer....(OK, so my icons suck, but hey...we're 75% there. ).. Page Edit List View Page Edit Grid View Page Edit Insert Media ProcessMediaManager
  12. kongondo

    Macaw

    The Macaw thing is on sale (going for $49)...if anybody's interested...
  13. Try removing the isset condition... <?php if($page->slideshow->count()):?>// or below if this doesn't work.. // <?php if(count($page->slideshow)):?>
  14. Works fine here: PW 2.6.21, PHP 5.4.22
  15. Yes. Use getQueryLog() (will only work with debug on) See example code here: https://processwire.com/talk/topic/11483-duplication-in-query-results/?p=106994
  16. My bad... I still haven't had time to re-up Blog's documentation. Meanwhile, please access it on WayBack Archives: https://web.archive.org/web/20141114094607/http://www.kongondo.com/tutorials/specific-features/creating-a-blog-in-processwire/render-posts Have a read of the tutorials there and you should be fine
  17. Errors in ProcessWire logs? A server error, etc?
  18. I am guessing they are related... Applying this to your case... It means line 119 refers to the script where the header() invocation failed (i.e. in shutdown.php). However, the source is line 19 in WireData.php. In my PW version, that's the beginning of the Class WireData. So unless you touched that, then it is probably something calling WireData.php that's failing.. Hard to tell though. The last time I got this error was trying to delete some page via API and it didn't work and it got stuck in memory and had to restart Apache...I know this is probably not too helpful...
  19. Hi driedstr, Welcome to PW and the forums. Here are some typical causes of that PHP error: http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php Any of those apply to you?
  20. You need to save the page first, then add the files, then save again (see example here)...So, are you sure the files are not getting uploaded or you are removing them (the code after ....// remove all tmp files uploaded) after saving the page?
  21. Welcome to the forums and ProcessWire You got two options: Use the ImageExtra module If you are using the page itself as a store for the image, you can use your page's title as the image's title By the way, in case you haven't seen it, you can enable image tags when editing your image fields.
  22. It is a recommendation (and for good reason...performance-wise [Google it] ).....but, personally, I almost always use your '2nd' example $editUrl = 'data-mfp-src="' . $page->editUrl . $lang . '&modal=1"'; ...for readability.... as long as there is no performance hit...
  23. Have a read here: https://processwire.com/talk/topic/225-how-to-work-with-ajax-driven-content-in-processwire/ It would be good to use $config->ajax; (or wire('config')->ajax if within a function Welcome to ProcessWire and the forums Edit: Your code is probably just an example but you need to sanitize your inputs before saving them and entitiy encode them if you are going to be echoing them back to the user immediately Edit 2: What Soma said below
×
×
  • Create New...