Jump to content

cjx2240

Members
  • Posts

    89
  • Joined

  • Last visited

Everything posted by cjx2240

  1. In your config.php $config->prependTemplateFile = '_init.php';
  2. Hi, I really wanted to try this out but I hit a roadblock straight away... the page didn't appear in the CMS after installation. I made sure the module folder was named correctly (saw the similar issue above) and I have the latest version of the code I also couldn't uninstall the module, it hit a php error. While trying to figure it out I've been uninstalling/reinstalling, it definitely hits various issues with the fact it can't remove/update system templates. It looks very interesting though, hope I can figure it out and have a go! Edit: ahhh well, I see the problem. Your bootstrap for creating the admin page assumes that the admin URL will be "/processwire/" - but mine is not! May be better to grab the admin page name there Edit 2: well I have had a look at it and I really like the idea of the way it works! Bit rough around the edges for sure (one bug I seem to have noticed is that I get errors about a sixth repeater row repeatedly after I have deleted it, same thing happens with snippets. They're gone from the original db, but visible and empty when viewing the migration on the target db more on that later*) but the idea is much more in line with how I would want to do migrations. For me though I hit two snags in my first attempt to use it. One is that it didn't include a hidden page in the export data, nor did it allow me to add something like "include=all" to the selector, so I could only add it by un-hiding my page to create the migration. Another is that it didn't include data from a ProFields: Table field, but I can populate that with a hook which is a great addition! Edit 3: * I actually hit a pretty big bug with this later on. I tried (mistakenly) to remove the errant rows on the target db and save it. I got the message saying that I can't actually save changes on the target db (fair enough) but then the status became "superseded" and I could no longer perform the migration.
  3. Just a couple of quick questions - and I know this might be more of a question for Tracy Debugger itself but - why can't I see "Field Code" in my Request tab? Edit: sorry, found it! Tracy settings > Request info panel > Panel sections if anyone else was wondering. Is there any other useful things I should turn on in Tracy for copying field data and similar?? 😄 And second question please, how do I add a field to a template and have it be inside a Fieldset Tab? Thanks in advance!
  4. Hi Bill, thanks for looking Not exactly. Although I have done something very similar to what you suggested already, in order to limit which portfolio's I'm getting based on something in the user details, so you were bang on the money on how to do that. All I really want, is to select portfolio-detail items, and have all the details from a matching user available to me in that selection. Eg, I've got a user like this $user->id = 392; $user->name = 'email_example.com'; $user->firstname = 'Jane'; $user->lastname = 'Doe'; $user->avatar = PageImage; And I've got portfolio detail pages like this $portfolio->title = 'Jane Doe'; $portfolio->user_id = 392; The former has all the data I want to grab for each item. But the latter has all the details I need to organise my site like URLs, tags, parent pages, etc. So I just want to kind of... merge them together neatly.
  5. Hi, this is a blast from the past, 2014 the last time someone talked about this module in here! And what a great module it still is. Is this still the best place to discuss? I've noticed today that {{id}} doesn't seem to return anything in the user template, could there be some obvious reason for that which I'm missing? Thanks!
  6. I have created a page with template "portfolio-detail" for every user's that's registered on my site, linked to by a field that stores their user ID. Now I want to be able to grab that user and integrate them with the page selector as neatly as possible. The reason for this approach is that the page, rather than the user, has many things built around it already, other fields, parent structures, etc. that are fundamental to filtering, url structure etc. I currently have this, but it means a separate query to the user table for every single user. This works, but a) I'm sure it could be faster/neater and b) it means I can only access their details with $profile->user->user_field instead of just $profile->user_field $profiles = $pages->find("template=portfolio-detail"); foreach($profiles as $profile) { $user = $users->get("id={$profile->user_id}"); $profile->user = $user; } Is there a better way?
  7. [edit - double post, can be deleted]
  8. That’s such an incredibly good idea I’m mad I didn’t think of it myself. Thank you! And well done understanding my requirements so well!
  9. I'm capturing the main content for a site using a registration/profile process. The end product will be a categorised showcase of their submissions. They're selecting the page that would be the parent category as part of the profile process. The easiest way to do this would probably be to copy the user pages to be "normal" pages when sign-up is closed. But I would like to avoid this as it would fracture the content if we needed to reopen registrations. So instead I would like to try leaving the users alone, and looping them simply by grabbing all users with the current page as their selected parent. It won't be as simple as browsing to /users/user-name, I need to put them in categories based on regular pages like /category/child-category/user-name I think this is easy enough, I know how to select the users and loop through them, load a template based on their page (I think) - but can you think of any reasons why I should or shouldn't do this, any complications I'm not considering? I'm going to try and store a nice unique name for them from their real name, when they sign up that can serve as the URL. Is there anything useful in the API that can make sure a name is unique and add a number if it's not? I know this is a bit vague, but anyone done anything like this before?
  10. Hm, thanks for the suggestion but that doesn't seem to work, I get the following when registering on the front-end. "Warning (requiredIf): dependency field 'hasRole' is not present in this form."
  11. Does anyone have a suggestion how I can make fields required during user registration, without making it so that admins also have to fill them out when making new admins? Thanks in advance!
  12. Hi, first of all great module, very helpful. Found an odd issue with this, not sure if its just some issue with my own setup? I added a second user and used the wrong token (I had generated two for two different accounts and grabbed the wrong one) The new user doesn't appear in the list (though they're in the db table) I also couldn't remove the original user (though they disappeared from the db) It's using the value stored in the caches table but it restores itself even if I forcibly delete that cached row. Forcibly deleting the user row from the module table and then putting it back in right, fixed the user being fetched, although still shows the wrong one in the module settings.
  13. Both of these options are excellent, thank you 😊
  14. I'd like to make a tiny tweak to the ajax page search in the top right corner of the CMS. All I want to do, is add the page's rootParent to the result dropdown. This is because due to the unique structure of a certain site, lots of pages have the same name, it's not clear which one to click on. Can anyone help me out with this please?
  15. Thanks for the suggestion, I will look into that. The suggestion to hook into pages::find seems useful, but is that advisable? Surely pages::find is happening a lot throughout the site, don't want to go slowing the site down (forgive me if I'm displaying some ignorance on how hooks work) On a similar note, I have ticked for this field "allow unpublished pages" which works for superusers, but not a secondary manager role I've set up (even though again, it works for regular InputfieldPage fields), any ideas what permission needs giving?
  16. I'm hooking into InputfieldPage::getSelectablePages In order to limit the results to a certain parent, on a multi-site setup. This works great. However I can't seem to do the same thing for an ASM Autocomplete style field. Does anyone know how I would go about this? Thanks
  17. Hi @Wanze - great module by the way Please can you tell me how I can omit or override the og:url tag? I have made changes to the URL structure of one particular page tree of my site, to remove the parent name from the url string. This is carrying over to SEO maestro for all but the parent page. I tried unsetting it in the renderMetatags hook, and overwriting it with $page->opengraph->url = "new url"; in the template, but to no avail. Edit: I see by looking into the module that the og:url is just set from httpUrl and can't be overwritten like other aspects
  18. Hi @flydev 👊🏻 - thanks for the suggestions. Actually this site is using Session Handler Database module but this pointed me towards that at least. Removing that module fixes it (had to manually remove it because I got the "forged" CSRF exception when trying to uninstall it) Not sure exactly why it was giving me grief with this particular site. I found another thread saying to change the sessions "data" column to mediumtext might solve this but it already was...
  19. Hi I've just inherited a ProcessWire site built by someone else and I'm hitting an error when unpublishing a page. (The error appears like a js alert with "undefined" as the message) In logs, I get the following: URL: /login/page/?action=unpub&id=3769&render=json Text: CSRF token does not match (in D:\sites\***\public_html\wire\modules\Process\ProcessPageList\ProcessPageList.module line 434) Does anyone have any ideas? This happens locally and on the production server. I'm also hitting a lot of "Session appears to be forged" issues. Site is on ProcessWire 3.0.142 Thanks
  20. This module works wonderfully and it really helped me a lot, so I just want to say thank you
  21. After a lot of googling and many years this still seems like one of the best approaches to remove an undesirable part of a URL. For example, if you wanted to group a bunch of landing pages as children of "Landing Pages" but you didn't want /landing-pages in your URL. However I did run into a pretty significant issue with it, it bypasses any permissions you have to prevent page view. So if guests dont have permission to view the page, it will still load that page
  22. I just want to say I love this module. It means I can have repeatermatrices made up of fieldsets, while also using those fieldsets on their own elsewhere, with much less clutter. Thanks for making it! Would it not make more sense though for the provided option to be added to Input > Admin theme settings (Uikit) ? Then also it could be overriden from within a template/repeater field group. I think this would be really helpful because while you're likely to not want the title/padding when loading a fieldset within a repeater matrix, you're likely to want it when loading a fieldset in a more standard context.
  23. Hi Ryan, are you aware that some live pages of the modules directory have been a bit broken for a while? eg https://processwire.com/modules/seo-maestro/
  24. Sorry to bump an ancient ancient thread but it seemed to me a fitting way to point out that, at least for me, this issue still exists 5 years later - and this post nearly tops google for "processwire ckeditor figcaption" Does anyone have a better way around this than "add pictures at the end"? As this isn't a particularly fitting instruction for a third party. It seems to me that there's two solutions that could be done, 1 - manage the caption in the image popup, or 2 - pressing return while in the caption tag should escape the entire figure tag.
×
×
  • Create New...