-
Posts
10,912 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
I'm working on it now - looks like that was broken when I added the option to declare which columns to export. Will have a fix shortly.
-
Ok, I can reproduce here. I'll commit the fix shortly, but in the meantime, replace line 107 with this: $rows = $p->$actualFieldName(ltrim($this->wire('input')->get->filter, ',')."limit=".$totalRows);
-
@k07n - what version of Table are you using? It requires v15 If you need support for an older version, grab this commit: https://github.com/adrianbj/TableCsvImportExport/tree/f1d6704af7d8bbd2dc1dda62f76a70d55cc09a7f although I would recommend upgrading Table instead.
-
I haven't checked this in a long time, but in my experience, quiet mode won't work for modified, so I ended up doing this: $sql = "UPDATE `pages` SET `modified_users_id` = '".wire('users')->get('name=admin')->id."' WHERE `id` = '".$c->id."';"; $update = wire('database')->query($sql); And make sure it is after your original $c->save because each save will change the modified back. Perhaps the more important issue here, is why do you care about the name of the user that created/modified a newly created page? If it was created on the frontend via the API, then it was created by a guest user no? Or is the scenario different to this?
-
Login using e-mail rather than username (and general login issues)
adrian replied to mindplay.dk's topic in Modules/Plugins
Thanks for posting @Can - I am curious though - did you try: Does this no longer work? -
If you really want the page's created user to be something else other than guest, you can do: $c = new Page(); $c->created_users_id = wire('users')->get('name=admin')->id; $c->save(array('quiet' => true));
-
Quick glance shows the first obvious problem is that you have a variable ($page) inside single quotes. You can either use double quotes, or concatenate. find("template=template1, field1=$page"); find('template=template1, field1='.$page);
-
What about the usefulness of having an "active" checkbox column for each available language?
-
Adding a link as well makes it possible to middle click / right click and open in new tab, so I have removed the additional link I went with another warning icon which I think works fine. Available in the new version. The one remaining issue (that I know of) with the attached version is how to handle newly added pages (with Add New) when they are added by a user when a non-default language is selected. The problem is that the default title is not populated and the default name is automatically populated with a timestamp. The easy option would be to disable adding new pages from non-default languages, but I think I should probably populate the default name with the same name as the language used to add the page. As for the title, maybe showing nothing for the default title is ok? What do you think - is adding new pages from the non-default language something that should be allowed? This is what it looks like after adding the Test page when in Portuguese and then switching to default (English): BatchChildEditor.zip
-
I agree, but I use grey to indicate a hidden page (and strikethrough for unpublished). I know they aren't essential because of the hidden and unpublished checkbox columns, but it's still a nice familiar visual indicator. Any thoughts? I don't know how given that the modal edit icon has no link, but rather a data-url attribute. Are you sure this works for you? Seems like a great idea - thanks!
-
Hey @tpr - I have made an initial (although took much longer than I thought) start on support multi-language in Edit mode. Keep in mind that this is not designed to make it possible to edit all languages at once, but rather add proper support for editing the title and name for the user's current language. Here you can see the same set of child pages in Portuguese and then the default English. The keys things are: When viewing a non-default language the Title and Name columns have the current language in parentheses. Title is left blank for the current language if no language-specific version is available (uses "Placeholder" to show default language title). Name is left blank for the current language if no language-specific version is available. If you have the BCE "Overwrite Names" setting checked, the name for the current language will be created/updated to match the entered title. If you edit the page in a modal and save, the title and name for the current language will populate the edit mode interface instantly when modal is closed. Unrelated to multi-language, but there is now a new "edit in normal mode" icon - sometimes I prefer this to modal and think a link from here is nice. I am going to attach the new version here for the moment - please let me know if everything works as expected for you. Portuguese Default: English BatchChildEditor.zip
-
If you want an easier approach than creating a full process module (not that it's that hard), but you could create a custom AdminAction using this module: https://processwire.com/talk/topic/14921-admin-actions/ Note that it's very easy to hide all the other actions from the required role and add your new action to the flyout menu so they have quick access.
-
Yeah, that would be the problem. If you use repeaters a lot, then I would highly recommend updating to the latest dev version of ProcessWire. There were a lot of great new repeater features introduced in 3.0.44 (http://processwire.com/blog/posts/pw-3.0.44-repeaters/) - we are now at 3.0.52. I do think the automated header from title was available before this, but would need to track down exactly when. 2.6.5 is REALLY old now
-
What about the "Repeater Item Labels" section on the Details tab of the field settings - what does that look like?
-
@kathep - sorry, I think I must not be understanding properly. Would you mind posting some screenshots showing your repeater settings and an example screenshot of a completed "Introductory Exercise" title and what the repeater header bar looks like after saving?
-
Well it's easy enough to not have them save to other languages even if the default is populated, but I think populating them is a little confusing still. What about setting the html5 placeholder as the default language title. Do you think that would be a reasonable UX?
-
Can´t upload same file to images and files field
adrian replied to dotnetic's topic in General Support
Very true, but I assumed he needed/wanted them to have the same name. -
Hey @tpr - good catch. I am looking into this now and actually thinking about revisiting the fairly recent change we discussed that shows the default language title when there is no title for the current user language. I am thinking about leaving the title field empty and maybe putting the default language in the tooltip of the warning icon that shows up. I also need to revisit how page names are handled - at the moment it's a mess if you change the title because it changes the name for all languages. Anyway, let me know what you think about my idea for making the title blank if it's blank for the user's language - just want to make sure I am not making it worse for anyone.
-
Can´t upload same file to images and files field
adrian replied to dotnetic's topic in General Support
It won't be possible to store the image with the same name twice because they are bot stored in the same folder in the filesystem. Why can't you download it from the images field? -
Hi @hacsor and welcome! Sounds to me like you either don't have the path to the RevSliderEmbedder correct, or it's a namespace issue. If the basic-page.php template file includes the ProcessWire namespace at the top, then you would need to change your call to RevSliderEmbedder to \RevSliderEmbedder so you are calling it from the global namespace.
-
CSV page import performance (35k pages, testcase included)
adrian replied to Beluga's topic in General Support
Glad BCE worked for you I am curious though what happened for you with Ryan's module. My local dev setup is definitely nothing special. A 2011 MacBook Pro with 8GB RAM and PHP 7.1 all setup via HomeBrew. I feel like something else must be amiss. I have never used MariaDB - I know it is supposed to be faster if anything and completely compatible with MySQL, but who knows? -
Thanks Steve - yes please let me know if it shows up again, but I hopefully it was an old issue that isn't present in the current version.
-
Unable to complete this request due to an error. after update
adrian replied to Tom Walcher's topic in General Support
I am getting the feeling that not everything in the wire folder was copied across correctly. I would suggest deleting it entirely and copying across the new one again. -
How do I inline an SVG (that was uploaded by an image field)
adrian replied to Alf S.'s topic in General Support
Yep - it will work on all servers - it will always be the full disk path to the image, which is what file_get_contents wants. Of course with the right PHP settings it can also use a full URL, but disk path is easier and more universally supported. -
Unable to complete this request due to an error. after update
adrian replied to Tom Walcher's topic in General Support
Is this live somewhere so I could take a look?