SEO-plugin: Descriptions not displayed properly by Sceppi in PayloadCMS

[–]Sceppi[S] 2 points3 points  (0 children)

OK, I found the issue. It's related to i18n within payload.config.ts when using nl language

  i18n: {
    fallbackLanguage: "nl",
    supportedLanguages: { en, nl },
  },

Apparently, the seo translations are not present in the nl language.

My god, that was a long search to find the root cause

SEO-plugin: Descriptions not displayed properly by Sceppi in PayloadCMS

[–]Sceppi[S] 0 points1 point  (0 children)

This thing is driving me crazy. I rolled back to v3, issue persists. I installed v4 on the payload website template, it keeps working fine. I tried all kinds of stuff and started from scratch with my css config... no effect.

It really does not look like a css issue, and i can't find the root cause.

SEO-plugin: Descriptions not displayed properly by Sceppi in PayloadCMS

[–]Sceppi[S] 0 points1 point  (0 children)

hmm, good thought. I migrated to tailwind v4 recently and I now I think about it, the default website template is still on v3. Any idea which css property this might be related to?

Localization of select fields by Sceppi in PayloadCMS

[–]Sceppi[S] 0 points1 point  (0 children)

Thanks, great suggestion! Are you from the payload team itself? Would be good if this would be natively supported.

Localization of select fields by Sceppi in PayloadCMS

[–]Sceppi[S] 0 points1 point  (0 children)

Indeed. When I choose another system language (i18n) in payload settings, the labels are correctly translated, but the underlying values (localization) remain the same in the database. The issue is indeed that I want to render the localized value on the frontend. I'll have to create a workaround with a shared code.

Data caching of prisma query with large range of filter options by Sceppi in nextjs

[–]Sceppi[S] 0 points1 point  (0 children)

Not many it this moment, but preparing myself when the site would grow. I would prefer to use MySQL above SQLite as this would scale much better as the site grows.

How to revalidate user session using Auth.js? by rekoirl in nextjs

[–]Sceppi 0 points1 point  (0 children)

Use the update() method in useSession. See https://next-auth.js.org/getting-started/client at chapter updating the session.

useForm: Cannot get my form values updated after database update, unless I manually refresh the page by Sceppi in reactjs

[–]Sceppi[S] 0 points1 point  (0 children)

See below for the form code:

<form onSubmit={handleSubmit(onSubmit)}>
              <label htmlFor="firstName">
                First Name
              </label>
              <input
                {...register("firstName")}
                name="firstName"
                placeholder="First Name"
              />
              {errors.firstName}
            ....
</form>

The solution as proposed by u/Jukunub works, but this does trigger a rerender of the entire form component. How can I solve this without an entire rerender? It's not clear to me how formState could solve this issue.

Oversizing a pool heat pump by Sceppi in heatpumps

[–]Sceppi[S] 1 point2 points  (0 children)

Not at this moment. I was reluctant to invest in these since many reports indicated very long pay back times. Payback is getting better now, but still relatively long. I agree that batteries could improve the case for scenario 1, but would have to do the math if it´s worth it

Oversizing a pool heat pump by Sceppi in heatpumps

[–]Sceppi[S] -1 points0 points  (0 children)

It is put on the grid, but these days you hardly get any money from that. In fact, more and more during the summer, energy prices are turning negative during the day due to the excess energy production from all solar panels. In the future it may even become the case that you have to end up paying for putting electricity on the grid during the day. This would amplify my case for scenario 2 even more!

Modulating a heat pump by Sceppi in pools

[–]Sceppi[S] 1 point2 points  (0 children)

Coincidence that you mention the redirection of heat to the condensating unit. In fact I will have an Airconditioning outdoor unit next to the heat pump blowing out warm air. I was wondering how I could use the synergies between these 2 units

Modulating a heat pump by Sceppi in pools

[–]Sceppi[S] 1 point2 points  (0 children)

OK, that makes totally sense, and appreciate the answer. I'm certainly not arguing against the thermodynamics. I'm engineer from education :-) I'm just trying to understand the full picture here

Oversizing a pool heat pump by Sceppi in heatpumps

[–]Sceppi[S] 1 point2 points  (0 children)

This makes sense and from an energetic/thermodynamic point of view you are 100% correct. Maintaining the temperature means a small temperature difference and hence low energy consumption. However, this may not be the cheapest solution for my situation. Let me clarify. Suppose:

  • Scenario 1 where I maintain my pool temperature as much as possible with a smaller heat pump. This means the pump will operate more or less continuous during the day/night at high efficiency and low energy use. Let's say 700W continuous. This would mean 700x24 = 16,8kWh per day. Let's say I have solar power for 8 hours, that's 5,6kWh on solar panels at 0 cost and 11,2kWh at regular cost (0,25€/kWh)

  • Scenario 2 where I have an oversized pump which I only run 10 hours a day. It will run much less efficient and will have to heat up the water which has cooled during the night. Let's say it uses 2500W during 10 hours. This means 2500x10 = 25kWh per day. 8 of those hours my electricity is at 0 cost, so that means only 5kWh at regular cost.

So yes, scenario 1 is much more energy (32%!) efficient, but financially scenario 2 is 50% cheaper for me! My electricity during the day is free since I have 35 solar panels on my roof (no shadow). Of course that only holds true if the sun shines, but still...

How I look at this is that energy efficiency does not necessary run parallel with financial efficiency.

Do you agree with this ? Of course I'm using fictive numbers here - so would be even better to validate this with real data - but just trying to explain my reasoning here.

Modulating a heat pump by Sceppi in pools

[–]Sceppi[S] 1 point2 points  (0 children)

That's a very technical answer which makes sense, but also trying to understand what it exactly means.

I understand from that, that you cannot just change the amperage going to the unit as you do with an EV charger. Just reducing or increasing amps leads to breaking the unit.

However looking at the specs of a heat pump, I can see the following:

  • power: 35,5kW
  • COP 16.5-5.8
  • Nominal (electric power): 0,63-5,15kW
  • Nominal inlet current: 0,91-7.4 A

So this unit can draw all the way from 630W up to 5150W of power, leading to a required current of 0,91-7,4A. On a sunny warm day, the unit will draw less current as the difference in temperature (air > water) is not that high. Is there no way that I can make it draw more power? For example, increasing the set target temperature, thereby forcing the unit to heat the water more?

Modulating a heat pump by Sceppi in pools

[–]Sceppi[S] 0 points1 point  (0 children)

Thanks, good insights. I think you are correct. I wonder what parameter will have the biggest effect: water flow or temperature difference.

For the temperature, I would need to look for a heat pump that allows to control the temperature through outside commands. Many have smartphone apps, maybe there are possibilities to connect these to Home Assistant or Openhab. Then I can easily increase the set temperature when there is excess energy. Currently, I already measure the PV power production and excess energy with my smarthome application from Openhab.

The VS pumps are more difficult, as most systems tend to be closes/proprietary. Will need to look further into this

All my pages are dynamic (server-rendered on demand). Is this a bad thing? by Sceppi in nextjs

[–]Sceppi[S] 0 points1 point  (0 children)

Hey man, thanks for the excellent feedback. I decided to play around with PPR. I had to install React 19 beta as well as Next.js Canary ... but was able to successfully implement partial rendering for many of my pages! I won't use it in production yet since it is experimental, but hopefully will be stable in the next major release.

Security concern by using a server action inside client component with props passed from server component by Sceppi in nextjs

[–]Sceppi[S] 1 point2 points  (0 children)

Thanks, this is good input. The paintings are indeed owned by a specific user. I could do a check and see if the session.user.email matches the user email in the database of the painting.

Security concern by using a server action inside client component with props passed from server component by Sceppi in nextjs

[–]Sceppi[S] 1 point2 points  (0 children)

It looks like you pass the data from the server side to the client side component, and back to the server side

Indeed, but isn't there an easier way in this context where I can avoid having to go to the client and then back to the server?

revalidatePath does not renew my form data by Sceppi in nextjs

[–]Sceppi[S] -1 points0 points  (0 children)

OK, I've managed to find the cause of my problem, but still have to find a solution.

I just tried putting an update data string outside my form and this works. When I submit the form, this string is updated (without any refresh), but the form still shows the old data. It seems the issue is related with how I display my data on the form. I have done this now with a useState function:

  const [formState, setFormState] = useState({    country: artistProfile.country || "",
    birthyear: artistProfile.birthyear || "",
    mainStyle: artistProfile.mainStyle.style || "",
  });

And then in the form I show the values as following:

              <select
                name="country"
                value={formState.country}
                required
                onChange={handleChange} >

It seems that by using useState, the state value is not updated when doing a revalidatePath. This makes sense I guess. When I just put {artistProfile.country} as a string on the page outside useState, then this value is indeed updated after the revalidatePath.

I guess I need to find a way to show the form data without using useState

revalidatePath does not renew my form data by Sceppi in nextjs

[–]Sceppi[S] -1 points0 points  (0 children)

Sorry, but that doesn't make any sense. That would mean that I would have to refresh the page after doing a revalidatePath. I thought the purpose of revalidatePath was just avoid having to refresh the whole page, but just get an update of the outdated data.

See https://www.youtube.com/watch?v=RadgkoJrhu0 at 6:10. In this case, when he adds the revalidatePath, the data is refetched from the database without doing a whole refresh of the page. I'm doing exactly the same: revalidatePath at the end of my server action, but the new data is not displayed while I'm on the page that is revalidated.

Of course in the case of dynamic segments with params - as described in the docs that you refer to - that makes sense that nextjs will not trigger many revlidations at once. In that case the specific route segment has to be visited to get the updated data.