Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. If you had at least 3.0.148 you could have used this method (@note: I am not sure when this method was introduced though) $field->setName($name); https://processwire.com/api/ref/field/set-name/ There's a host of reasons why this could be happening (judging by similar issues previously reported in the forums). It's hard to tell what could be the cause. Maybe going through this will shed some light? https://processwire.com/docs/start/install/troubleshooting/ Maybe. What's your server details? (Apache, PHP, etc...) Have you tried upgrading your ProcessWire version? Is this a multilingual site? Is this a multisite? is mod_security running on the server?
  2. For others reading this, the new location of these docs is: https://processwire.com/docs/start/install/troubleshooting/
  3. I don't think that is what is being recommended here :-). The expressed need in OP was for admins (e.g. editors, trainers, teachers) to be able to view list of students' ratings, registered students, etc in a unified interface.
  4. I'd totally forgotten about this one ?. Thanks for the reminder.
  5. This is still happening to me. I am not sure if it is due to a chrome extension or not. I've given up investigating for now and instead installed a chrome extension to auto load the tab with the forum/unread page every so often.
  6. Thanks for reporting back. I'll keep an eye on this. Will do :-).
  7. There isn't a list per se. New stuff is usually reported in Ryan's blog posts. API explorer usually takes care of documenting API variables (but not internal ones).
  8. Not an answer, sorry, but just wondering if you were able to resolve this? I know you always report back, so maybe you are still working on this? Or did you abandon the idea?
  9. I don't think it's possible I am curious about this. Could you please explain how you are going about this and the use case? Thanks.
  10. @MoritzLost: Is this true for Composer as well? Thanks for the write-up.
  11. These two posts seems to suggest so. I haven't tried it myself. Maybe you can try and let us know ?
  12. My understanding it is useful in cases where composer is not installed, in which case classes will be loaded from file paths.
  13. Glad you got it sorted :-).
  14. In that case what you want is to rewrite the URL. It is a divisive topic :-). Have you considered alternative, e.g. restructuring your site? Anyway, if you are sure you want to rewrite the URL, this is the go to topic: See the section on URLs. This post might also be relevant:
  15. A $session->redirect does exactly what it says on the tin; it will redirect. It seems you have a parent page called 'pages'. One of its children is 'about-us'. In the frontend, you don't want people to see 'pages' in the URL. You want them to access the parent's children directly. For instance, you want ONLY 'about-us' in the URL. Finally, you don't want a redirect Is this correct?
  16. Given that your field is named images, I am guessing it is a multi image field. This means the field can contain more than one image. This depends on how you set up the field (see its settings when editing the field. Assuming this is a multi image field, you code above won't work. Speaking in very general terms, there are two types of fields: Ones that return only a single value and ones that return multiple values. For instance, an email field will return only one value; the@email.tld. For the fields that can return multiple items, think about it this way... Imagine you have a basket. The basket can contain several fruits. If someone asked you to "give me the fruit"? Your natural response (assuming you are willing to give;-)) would be "which one"? This is because there are multiple fruits in the basket. By requesting the fruit, it implies they want not just any fruit but a particular fruit. That is the same thing you are asking in your code above; "Give me the URL" and ProcessWire is responding with which one? There are several images here, which one do you want? Back to the images, you will need to either specify which image's URL you want or have ProcessWire return the URLs of all the images in the collection (the field on that page). The latter means you have to loop through the images field (collection) as well. Some code.. foreach ($entries as $entry) { $images = $entry->name_of_your_image_field;// e.g. $entry->logo // we want all images so we loop through the image field foreach($images as $image) { // just an example echo $image->url; } } Edit You access a field of a page using its (the field's) name. @see my edit above ($entry->logo). If the image field is of type single, you don't need to loop through it. Just echo its content, e.g. echo $entry->logo;. In other words, there is no API variable called images in ProcessWire.
  17. Not sure you've seen this in the docs ($classLoader) https://processwire.com/api/ref/wire-class-loader/
  18. To answer part of your questions In the example code you've shown, they are using the use operator so they don't need the namespace on top. The use operator is mainly used for giving aliases to names of classes. https://www.php.net/manual/en/language.namespaces.importing.php
  19. Hi @Maverick, Apologies, this slipped under the radar. I will look into this issue and report back ASAP. Thanks.
  20. Very late to this party... Another possibility (just thinking out loud here) would be to set up a temporary hook that will make the changes for you behind the scenes on save page. You'd need to remember to remove the hook when done developing.
  21. Hi @porl, @gebeer, all. Apologies I have not been able to respond to your posts. Unfortunately I still don't have the time to look into the issues raised.
  22. Hi @tinacious, Welcome back to ProcessWire :-). I have gone over your posts several times and I can't make any sense of what the issue is :-). Maybe it's just me but I am wondering whether others too are failing to grasp the issue, hence the lack of responses? I can't tell whether you are talking about the backend or both backend and frontend. What type of field is this? What template is this? What sort of fields are these? I don't get what the page selector is ? What Checkboxes are these? Is it a field somewhere? Maybe a screenshot or a drawing of what you are trying to achieve could help.
  23. Maybe test on a clean install? In case it helps, the role I tested with had some editing permissions, by the way. What permissions do your have?
×
×
  • Create New...