-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
Hi @awebcreature - I have just tested with the contents of your CSV but am not seeing the problem here. Based on the line of the error, it looks like you have "Convert comma decimals to dots" checked. But none of your entries have any commas or dot decimals. Did you change the "Columns separated with" to semicolon to match your data? Can you perhaps send me a screenshot of your settings for the import, along with the Details tab of the table field so I can see how the table fields have been defined. Also, a copy of the CSV might be good, just to make sure I am dealing with exactly the same data. Also, can you dump $value before that error so I can see what is in the array?
-
Honestly haven't checked to see if it is appropriate to your needs, but have you tried findMany(): https://processwire.com/blog/posts/find-and-iterate-many-pages-at-once/
-
Hi @nirgendswo and welcome to the forums. You can store the image on the homepage (or a dedicated settings page) and define a variable that grabs the path to the logo: $logoUrl = $pages->get('/')->logo->url(); You can do this in a file that is included for all templates - perhaps and init.php - it really depends on how you are structuring your template files and how you are outputting. PS - you may also find this discussion useful: https://processwire.com/talk/topic/12198-modifying-config-property-eg-sitesettings-from-readyphp/
-
Adding a field via SQL is not that simple. It also needs an entry in the "fields" table. Add that and things might work. The real question is why are you adding it that way? If you need to do it programmatically, why not via the API? Tell us more and we can help more.
-
@jensweigel - please try this commit: https://github.com/adrianbj/ProcessMigrator/tree/3e2121b8fdb68e9d9dc0c6aca8aae75e923a2669 I also have a PR from @jlahijani (https://github.com/adrianbj/ProcessMigrator/pull/5) which may also take care of the problem. I will try to make some time today to review his changes and the last working commit noted above and get a new version out.
-
Hi @kixe - glad you're finding it useful. I have just added Exclude/Include switch that you suggested. The default is exclude to ensure backwards compatibility for those upgrading and not checking anything new in the settings. Thanks for the suggestion and please let me know if you have any problems. Also, I have now made the module always ignore the homepage - before I recommended users exclude it on multilanguage sites, but I couldn't think of any reason why it would be needed on any site, so I think this is simpler and cleaner.
-
Admin Search - no unplubished Pages can be searched
adrian replied to Erik Richter's topic in General Support
This should be fixed now: https://github.com/ryancramerdesign/ProcessWire/commit/d45781d5af21e6aa6b838463a2acc4bcecbcc1a4 Can you guys test and confirm? -
Problem with Ajax images upload and SessionHandlerDB
adrian replied to Soma's topic in General Support
I just came across another issue with SessionHandlerDB - I am getting the following error with the latest Tracy dev core when trying to reopen a session. 1406 Data too long for column 'data' at row 1' in SessionHandlerDB/SessionHandlerDB.module:109 I will be looking into this further shortly, but just wondering if this might have something to do with the image upload as well. Maybe the data field simply needs to be changed to mediumtext or longtext, or maybe it's more complicated. I am definitely having some issues though too with the session being closed that only happens when SessionHandlerDB is installed. -
@tkaranka - multi-language is not currently possible, but we do have some functionality for multiple value fields which could be extended to support multilanguage - the catch is that I am not a ML user myself so I am not terribly familiar with it, although I would love to see BCE support it at some point. Either way I am glad it's been a big timesaver for you. @feniks502 - This option is only available if you define separately configurable pages: and then you check this on the Settings tab of the page(s) selected above: But this is only necessary if you them to be able to select the fields to export. You can also define them yourself on the Settings tab of the page, here: Please let me know if it makes sense now!
-
Can you describe the problems you are having - they should be an easy fix.
-
Ah sorry - yes of course that will be a problem for non-logged in users - didn't think that through If you go with dummy templates you'll still need to create a template php file in the site/templates directory to include your acs.php file. I think the easiest option is going to be to simply instruct users of the module to move acs.php to the root of their site. Another idea might be to check f the url contains acs.php and then hook on the pageNotFound to call a function which contains the logic from acs.php, eg: https://github.com/Notanotherdotcom/MarkupSitemapXML/blob/master/MarkupSitemapXML.module#L28 Maybe I am missing something else obvious - it's early and I am groggy!
-
Hi Mélanie and welcome to ProcessWire! Since you are starting a new project, I would definitely go with the devns branch which is the upcoming 3.x version. It is quite close to being released as the new stable version and many of us are using it on production sites, including processwire.com Don't be shy about asking questions as you start to dive in - I am sure you'll love it
-
Glad you sorted out the name problem. The simplest way for you to handle making acs.php url accessible is to instruct users of the module to move the file into the site root. You could try to do this programmatically on install, but the module may not have write permission so not good to rely on this. If the user has to manually move this is obviously more problematic for the user, so the best approach is probably to make a companion helper Process module and attach the process to a hidden page under Home > Admin. There a several example of this approach in the modules directory, but just because I just did this myself recently with Tracy, take a look at this: https://github.com/adrianbj/TracyDebugger/blob/master/ProcessTracyConsole.module You'll see that it adds a page that can be called via a URL and assigns the Process to that page. Also note that the main Tracy module: https://github.com/adrianbj/TracyDebugger/blob/master/TracyDebugger.module#L38 installs this helper module automatically. Hope that helps.
-
Hey Adam - have you noticed the case used in the names of all other modules? Just match that and you'll be fine.
-
Depending on your needs, you may prefer to use this module, rather than actually renaming the page: http://modules.processwire.com/modules/process-redirect-ids/ I am not saying it's a better approach - just different
-
This is the one I have always liked: http://jeffreysambells.com/2012/10/25/human-readable-filesize-php But I would also vote for an option to automatically calculate the number of decimal places / significant figures.
-
Thanks @monchu and @Robin S - I have checked here and also see the problem based on deleting the default Find Lister. I have posted a Github issue: https://github.com/ryancramerdesign/ProcessWire/issues/1868
-
Module HelperFieldLinks - field and template edit shortcuts
adrian replied to Soma's topic in Modules/Plugins
Yeah, there a several posts about this if you look back through this thread, as well as a Github Issue (https://github.com/somatonic/HelperFieldLinks/issues/6) - sounds like Soma has had trouble reproducing, so maybe one of us needs to help out and put together a PR that fixes them all - anyone keen? -
Ok, the latest version comes with the new Console panel that I introduced a few posts back. Here are the key points/features on this panel: Has full access to all PW variables: $pages, $page, $user, etc Works really nicely with fl() calls, but you can also make use of d(), l(), or even simply echo() All output is generated via ajax, and so is virtually instant No need for editing a template file and reloading the page in browser - simply type your code in the console panel for an instant result Only available to superusers Caches code in the filesystem so it stored between page reloads, navigation to other pages, and even browser restarts Note that for those of you upgrading you will need to install the new Process Tracy Console module that is now included. For new installs, this will be installed automatically with the main module. Remember that this allows you to run any PHP code, so be careful! Please let me know what you think. Here are some example calls and their results:
-
Cannot edit or delete images in image field after update to 3.0.18
adrian replied to MarcU's topic in Getting Started
In addition to the core cropping functionality, there are two third party cropping modules: http://modules.processwire.com/modules/croppable-image/ http://modules.processwire.com/modules/fieldtype-crop-image/ Neither of these work properly in PW3. The one you are using is tagged as compatible up to PW 2.4 only. The other one has a dev branch (https://github.com/horst-n/CroppableImage/tree/PW3) that works for 3.0.17 only. You should have a read of these threads: https://processwire.com/talk/topic/13215-pw-3017-major-upgrades-to-images-field/ https://processwire.com/talk/topic/13279-pw-3018-yet-more-images-field-upgrades/ Not everything is relevant, but there is a lot of discussion about further enhancements to cropping in the core to allow for predefined crop ratios etc. I think if you are wanting PW3, then unfortunately you will need to be satisfied with the core cropping for the time being. -
Hi Peter - I am using it here on PW3 and it's working just fine. Are you having any specific problems with it?
-
Glad to help Zahari! I think your question has no definite answer. I do however think that all the profiles should be namespaced, or none namespaced (https://github.com/ryancramerdesign/ProcessWire/issues/1866). I think it is confusing to have a mix. It is going to be a difficult time with those profiles being namespaced when many modules are still relying on the filecompiler to make them PW3 compatible. Personally I haven't been namespacing template files yet (or my modules for that matter) because I want PW2 compatibility. But moving forward I expect at some point we'll all be namespacing by default and not relying on the filecompiler. So for the moment, maybe just be aware that when calling a module's class like that, you will need to reference it in the global namespace and all will be good. You'll notice in that GH issue I linked to that I pointed Ryan to this thread, so maybe he'll also chime in here with his thoughts now that PW3 is getting close to being the stable branch of PW/
-
I'm afraid I don't really know what you are trying to change - by the ""Page tree" menu item is marked as active/current", do you mean the breadcrumb trail? Perhaps a screenshot may help us understand your goal a bit better.
-
Hey @tpr - you have been busy while I have been away I haven't played with it yet, but it looks awesome - do you feel like another feature request? https://processwire.com/talk/topic/13041-pw-3015-new-quick-tree-debug-view-panels-and-more/?p=118514 Not sure how easy this would be to do in your module, but thought I'd throw it out there!
-
Looks like you have a namespace issue - I am using AIOM on a PW3 site without any problems - the file compiler is properly taking care of things. That error is coming from the uncompiled version of _main.php though - are you using PW3? Do you have the filecompiler on? Are you manually specifying the ProcessWire namespace? I am guessing the latter - you are manually specifying the namespace, but AIOM is not namespaced, hence the problem. What happens if you do: <link rel="stylesheet" type="text/css" href="<?php echo \AIOM::CSS('css/stylesheet.css'); ?>"> Note the backslash to request the class in the global namespace.