« first day (3503 days earlier)      last day (1463 days later) » 
00:00 - 17:0017:00 - 00:00

5:18 PM
@Tpojka I know, sorry... it sort of developed as we were talking... =)
 
Better safe than sorry development. :D
 
insert rubber duck emoji here
 
I was about to say I did rubber duck the problem first... but bouncing it off the room seemed to open up some other thoughts that did not arise when conversing with myself and my bearded duck here in the office.
 
If room's responsibility is having you not talking to self, then we did it pretty much well.
 
5:23 PM
user image
6
@Tpojka @IMSoP =P
 
lol
 
I am envious of that duck :)
 
lol- a friend of mine gave it to me because I was talking to a digital one prior to this one.
Sometimes I pick it up just to tell it how stupid I am.
 
https://i.imgur.com/LNIZw5c.jpg

Rubber bulb here but bearded duck is something.
 
5:38 PM
I feel like I need a bearded rubber duck in my life.
 
@Tpojka lol- I had one of those... but I squeezed the life out of it.
@CharlesSprayberry You definitely do- your beard is better than mine. =)
 
Yeah was about to get in here too
Sorry @StatikStasis. Really hard to beat @CharlesSprayberry
 
Oh, I agree completely!
My wife tells me mine is getting scraggly and so I end up trimming it every 2-3 weeks.
@CharlesSprayberry .i.imgur.com/jw00pc1.jpg
Bad photo for the beard, honestly. Was focused on the shirt at the time.
 
5:53 PM
I have...cats
 
That's better- @Tiffany
 
nice.
 
@Danack Now it looks like your "nice" is about the dubberduck cats, rather than the initial 1,000 character URL that I first posted. =)
 
Wes
6:10 PM
i like the bearded duck, reminds me of danack
 
FWIW, my avatar is an older picture and my beard is actually longer now than it was then
@StatikStasis To be fair that is a pretty awesome shirt
 
Wes
amazing doggo btw
 
@StatikStasis Whenever I trim it myself I gap it up and have to start over. I normally have somebody else do it for me but all the businesses being closed I'm starting to look pretty "just emerged from the woods after living with wolves for 6 months"
 
Wes
6:28 PM
dumb question, what does "binary safe" mean in the manual? the fact that the functions can handle null bytes just fine?
 
Yes
 
Wes
are there any non binary safe string functions?
 
@Wes password_verify if you consider that a string function
or rather password_hash
 
Wes
ah, like, anything after the null byte is just trimmed off?
 
yes
 
6:35 PM
I'm having some trouble with PHP, I've put out a question but it's gone pretty dead, would any of you legends be able to take a look?
Let me see your user model and user's table migration — Immeyti 14 hours ago
 
I don't have user models. Mine are all ugly old men
 
Let me see your user model and user's table migration — Immeyti 14 hours ago
 
No need to repeat it I would say
Also that question is way too long
 
No lol I'm trying to paste a link
 
If you want a good answer you should start writing a good question
Copying entire classes and templates will almost never result in anything good
 
6:38 PM
I tried to provide as much detail as possible, did I go overboard?
 
Yes you did :P
 
> #0 C:\Users\Name \Desktop\\\\vendor\laravel\framework\src\Illuminate\Database\Connection.php(631): Illuminate\Database\Connection->runQueryCallback('insert into `us...', Array, Object(Closure))
where's your Connection.php file?
@ASP.NETMVCStudentProgrammer and yes, you did
 
Provide all the relevant code
 
Lol sorry about that, how would you have asked what I asked? As in what shouldn't I have included
 
@ASP.NETMVCStudentProgrammer you need to think through how the code works, and provide the bits that are relevant. If that is difficult, take a break, then try to reason about it with a fresh head.
 
6:41 PM
I took a look at the connection.php it seems more like an catch exception rule then something useful, should I have added that instead of the log?
 
your error message is an SQL error
it says that the name column is missing in the field list, that should tell you something
 
Yeah that's the thing though is if I could find the table or where it's being created inside my myphpadmin I would just add it or find where its naming the table then I could change it to one that has it but I cant seem to find it anywhere
And if you take a look at the comments I posted in there about how I changed the name tag inside one of the references and now I dont get an error I just get a refresh
 
I don't know how laravel works, but I'm guessing that means a table needs to be created, or a table should've been created during a process, and wasn't
 
I find it really odd
Because I reran migration even with --seed
 
possibly the database user account doesn't have the permissions to create a table?
 
6:47 PM
I would think it would give me an error though
Like a permissions error
 
it should
can you try testing creating a random table?
that is, log into MySQL on the server it's running with the database user and attempt creating a table inside the database
 
I can give it a shot, I've got another table in there which has all the relevant tables ready. That's why I'm trying to track down where the reference is so I can change it to one that I've created
 
heh, even laravel disables ATTR_EMULATE_PREPARES
 
Lol I don't know what that means
 
@IMSoP I hadn't heard it explained like this before, very good way of putting it.
 
6:57 PM
Jeez @LeviMorrison you've got lots of rep
 
It's all relative. My rep is nothing compared to the top 10%.
I haven't tried to gain rep in the last year at all, yet it still goes up.
 
A man of passive rep
 
I remember when @PeeHaa only had 40k
 
I don't anymore? :P
 
@ASP.NETMVCStudentProgrammer Can you confirm users.name field is missing?
 
6:59 PM
it's 60k+ now
 
Look at me sporting 60k
The lesson is to just ignore main and interest will pick up I guess
 
If you really care about rep, find a popular question with bad top answers, then post your better answer here every so often to advertise it.
Eventually it will just start gaining rep without further work.
Look at how much rep I got for this one! stackoverflow.com/a/23641033/538216 I posted an answer 5 years after the fact...
 
I've asked and answered like two questions on the SharePoint exchange back when I was working with SharePoint pretty regularly, and those are still getting upvotes
 
User.name is there I changed it to users.firstname but I dont even know if its using that table because when I comment out the name column and try run it gives me no error but doesnt even fill the DB, I can even send my file if it's appropriate just through like drive link?
How is sharepoint going in today's market is it still widely used or dropped alot?
 
You are checking for users.name in store method. Not for users.firstname. So problem begun when you changed column name without consideration of consequences.
 
7:03 PM
it's like any product, it depends on the use-case
I used to work for a college, and US higher education institutions get Microsoft licensing for free, so former employer had SharePoint Online for free, all that was needed was for me to be trained
 
I'll take a look and try rerun the reg, where would I change it to store users.firstname?
 
@CharlesSprayberry @Wes designed it! Maybe since I have pinged him he'll provide the link. =)
 
@StatikStasis have you seen the one he's working on?
 
That's the same as here in NZ the schools use sharepoint, I studied sharepoint during my IT degree
 
yes, you did
 
7:05 PM
@Tiffany That's it. =)
 
@ASP.NETMVCStudentProgrammer former employer used it as an internal portal and document warehouse, it worked rather well
 
Also, you are name field from request and checking if that one is unique in users table but after all checks you are making store into config('laravelusers.defaultUserModel'). If that is not User model, that would be problem no.2.
 
add the fact that AD is built-in and it works nicely for users, plus drag-and-drop for documents was a boon... another thing with SharePoint was consistency, if something didn't work, usually it was consistent about what didn't work and why
 
@LeviMorrison Probably because you removed your cat avatar... animals always make everything better.
 
Wes
lol that photo with your wife being very enthusiastic about the hoodie :D
 
7:09 PM
Never mind... that doesn't make sense now that I reread that @LeviMorrison. Thought you said rep "was not" going up.
 
@Wes =D
 
@Wes I interpreted her reaction as a "uh huhhhh..." like "yeah, sure, okay, I love you, honey"
 
@Tiffany I saw his "revised" one he was working on. Not sure I have seen the latest one or not.
@LeviMorrison I just upvoted. =)
 
@StatikStasis that's the one, I looked it up and saw that you were the first that responded to it
 
7:11 PM
@Tiffany Almost verbatim.
 
hahaha
 
@StatikStasis +1
 
Most of it is through a package called laravel-users & default Laravel authentication scaffolding I'm not really sure why it would be linking it all wrong am I able to send you the file via a google link or is that against terms of service for stack?
@Tiffany I did more around the workflows and linking it between a website with an intranet style
 
I couldn't imagine using SharePoint as a primary website provider, eurgh
I know it can do it, but I wouldn't want to
 
You have some application, you've made some changes but after installing third party package app stopped working. Probably because 3rd party package expects to be installed into default scheme or to be changed accordingly. Try to revert firstname back to name and check if that works.
 
7:19 PM
That does make sense, how do you know it's trying to add it to the users table?
@Tiffany the frontend of the site was wp, it just had like a backend of sharepoint which the users could login if they were employee
It was a pretty raggedy site if I'm honest
XD
 
oh, yeah, I've done similar. Created a frontend which linked to the SharePoint login page, user logged in, ta-da
 
I just found that the sharepoint side was more specific to education then anywhere else
*specific -> useful
What typical organisation would you come across requesting sharepoint when you were offering it?
 
a local place...they're a food distribution company, I've heard they use it internally
it's useful for sharing data and documents internally, especially if the organization uses Active Directory
 
Yeah, do you like working with it?
 
this should probably be moved to a separate room since it's off-topic
 
7:28 PM
@Tpojka I just dont know where exactly its pointing the post method to users table because that would give solid clarity that the process in some respects is working with sending to the correct section
 
It should be UsersManagementController::store()
If controller you posted there is right one.
 
But lot of things is mixed there (between that one and default laravel's one). I am not sure why would you use both.
 
Interestingly directions told me to run the scaffolding which makes all the default ones
 
Then you have to care how you add custom one.
 
7:34 PM
Sorry can you rephrase that I didn't understand it
I sent the drive file if it's against terms of service please just delete
 
If you are/were already using default auth routes with their controller/methods, you should very carefully add custom registration code checking what is affected in default code by that.
@ASP.NETMVCStudentProgrammer :49418823 I don't download things from the net. Use pastebin.com instead.
 
Do I copy the whole project in there?
 
Well, I am not sure I can go through whole project. I told you that first error is because you randomly changed name to firstname. Also, I asked you if you revert back that change (anything that was changed during name => firstname) would it solve current issue and I am still waiting for answer from you. :)
 
8:01 PM
I'll give it a go and get back to you no chance you'll download the drive file?
 
There are github, pastebin and Stackoverflow. No need for files download. Just check if it would work with default code. If it does, you need to debug your custom code line by line and fastest way to do that is with use of xdebug.
 
What's the current working lxr?
 
heap.space
 
@Girgias thanks
 
NP :)
 
8:08 PM
Minor Service Outage
 
Hi peeps. In Symfony 5, if you have an User, Post and Bookmark entities. and I want to find from with in the post show page 'post/{id}', if the user has bookmarked that post. How can I do that? (inside the bookmark entity there is user, post and date properties. )
 
8:21 PM
What is concrete question? Do you already have relations set between those?
 
@Tpojka yes
concrete question: how can I check if the user has bookmarked the post from the post display page?
 
It should be 1:1 post bookmark and 1:n bookmark user if I am not wrong.
 
No, inside Bookmark: user -> ManyToOne, post -> ManyToOne
 
Which one?
 
@Tpojka any ideas?
 
8:36 PM
I am trying to relate Doctrine to Eloquent (that I am using).
In my head user can have many posts (own posts) and also user can have many bookmarks of other's posts.

user 1:n post
post 1:1 bookmark
user m:n bookmark

This is structure that would allow multiple users to bookmark some post but also that would allow user to create multiple posts.
with 1:1 between post and bookmark you can get right bookmark and then also collection of users that could be checked if contains (logged?) user or which user you need to check.
 
All issues have been resolved!
 
@Tpojka I'm giving it a go, thanks :)
@Tpojka How would I check in twig {% if property.bookmark ...
 
8:56 PM
https://twig.symfony.com/doc/3.x/tags/if.html
https://stackoverflow.com/questions/34870091/check-a-value-exists-in-array-from-twig/34871305
 
@KerrialBeckettNewham Since you pretty much have a 1:1:n relationship you'll need to loop through the users bookmarks to check if any of them point to the given post. If you just do that in Twig lazy-loading will execute tons of queries. If would be better if you wrote a sub-query where you're fetching the posts to see if the given post was bookmarked.
SELECT
    post.id,
    post.title,
    CASE WHEN (
        SELECT COUNT(bookmark)
        FROM App\Entity\Bookmark bookmark
        WHERE
            bookmark.user = :user
            AND bookmark.post = post
    ) > 0 THEN TRUE ELSE FALSE END bookmarked
FROM App\Entity\Post
Something along those lines. Hope that helps.
Actually, maybe the lazy-loading wouldn't be too bad. You'd just need to load all the users bookmarks (which could still potentially be a lot) once. Then you can just compare the post id which won't trigger the post to be loaded. Whether that's feasible or not depends on the amount of data.
 
@IluTov yes, just as long as there are too many bookmarks.. which tells me there is a design flaw. I need to rethink it.
 
{% if user.bookmarks|filter(b => b.post.id == post.id) %}
{% endif %}
This should work, but as mentioned causes the bookmarks of the user to be fetched (which might or might not be a problem)
 
@IluTov I was so close :D not used to these arrow functions in twig. (well anonymous functions)
@IluTov I think it'll be better if I make the Bookmark -> Post relation OneToOne.
 
9:12 PM
Hm oh yeah I didn't even realize, yeah that would make more sense. This should be a 1:1:1 relationship. Alternatively you could drop Bookmark and make User:Post a n:n relationship
(Unless you're storing additional data on the Bookmark)
 
@IluTov yeah got the date
 
Ok, then 1:1:1 would be the right solution I think :)
Sorry, no what I'm saying still doesn't make sense :) Users still have multiple bookmarks and posts still have multiple bookmarks (from different users) ^^
So, User <-> Bookmark is 1:n and bookmark <-> post is n:1
 
@IluTov I think that same bookmark can be related to many users.
No, m:n user-bookmark.
 
@Tpojka A single bookmark is made by a single user, that's at least how I understood it
So, when I press the bookmark button, a bookmark entry is created that belongs just to me
 
If you make post - bookmark 1:1 (which I agree) you have to allow multiple users to use™ that bookmark.
 
9:16 PM
with the date of when I created the bookmark, so not multiple users
 
Both of us can bookmark same post written by @KerrialBeckett.
 
@Tpojka sure, that's 2 bookmark rows
with different dates
essentially, bookmark is just a join table between posts and users with an additional date field
 
Ah, you then use bookmark as pivot between post and user. I thought of bookmark more like post's (1:1) attribute.
 
@Tpojka Exactly
 
I will read now because we shouldn't post two concepts and you seem better with Doctrine than myself. :)
 
9:27 PM
@IluTov How would you check it in twig with a 1:1 {% if not property.bookmark %} ?
 
@KerrialBeckettNewham I was wrong (mentioned above), it's a 1:n:1, one user has many bookmarks, one post has many bookmarks
So the above should work fine
{% if user.bookmarks|filter(b => b.post.id == post.id) %}
{% endif %}
 
@IluTov I'll give it a go :)
 
9:49 PM
@IluTov When I use this, it does give the expected output. it renders the condition true regardless of if the post has been bookmarked
 
@KerrialBeckettNewham Can you {{ dump() }} the result of user.bookmarks|filter(b => b.post.id == post.id)?
 
CallbackFilterIterator {#2643 ▼
innerIterator: IteratorIterator {#2879 ▼
innerIterator: ArrayIterator {#2860 ▼
flag::STD_PROP_LIST: false
flag::ARRAY_AS_PROPS: false
storage: []
}
}
}
 
Ok, you probably just have to add a |length filter
 
@IluTov what do you mean?
 
@KerrialBeckettNewham user.bookmarks|filter(b => b.post.id == post.id)|length
I wasn't aware |filter returns an iterator
 
9:58 PM
@IluTov Thank you for helping me. I also didn't know that.
 
@KerrialBeckettNewham Np, so does it work?
 
@IluTov yes, seems to be. now just got to figure out how to unbookmark it from there.
 
@KerrialBeckettNewham Nice! You could just assign bookmark to a variable like this:
 
something like this I'm thinking path('bookmark', {'id': app.user.bookmarks|filter(b => b.post.id == post.id).first })
 
{% set bookmark = user.bookmarks|filter(b => b.post.id == post.id)|first %}
And then pass bookmark.id as a param
@KerrialBeckettNewham Close, .first won't work because there's no such method on the iterator. |first should work though.
 
10:04 PM
@IluTov Ok, that's cool :D worked
 
@KerrialBeckettNewham 👍
 
@IluTov Thanks 🙏
 
10:21 PM
Nice @IluTov :)
 
 
1 hour later…
11:31 PM
if the "ini" is by itself in documentation, should it be upper case or lower case?
 
00:00 - 17:0017:00 - 00:00

« first day (3503 days earlier)      last day (1463 days later) »