User tests: Successful: Unsuccessful:
Pull Request for Issue #39480.
Add extension parameter in createTemplate static function.So that a new record will insert into database after creating email template.
Just make same change as in this PR and create a mail-template and see mail-template after saving in database.
After creating mail-template a new record not inserted into database in mail template table
After this changes on creating mail-template a new record inserted into database in main template table.
Please select:
[ok] No documentation changes for docs.joomla.org needed
[ok] No documentation changes for manual.joomla.org needed
Category | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
As I am beginner in joomla-cms contribution so I have less idea about improving code .So please tell me any improvement to this issue if you have !
The first fix that is needed in your branch at https://github.com/Kaushik1216/joomla-cms/blob/4.2-dev/libraries/src/Mail/MailTemplate.php#L388:
$extension
is not allowed at the moment. Remove it!The second is:
$template->extension
by using the $key
!$template->extension = explode('.', $key)[0];
But please be aware that I only collected the comments of others here; concerning backwards compatibility.
As I am beginner in joomla-cms contribution so I have less idea about improving code .So please tell me any improvement to this issue if you have !
The first fix that is needed in your branch at https://github.com/Kaushik1216/joomla-cms/blob/4.2-dev/libraries/src/Mail/MailTemplate.php#L388:
- A new method parameter
$extension
is not allowed at the moment. Remove it!The second is:
- Get
$template->extension
by using the$key
!
$template->extension = explode('.', $key)[0];
But please be aware that I only collected the comments of others here; concerning backwards compatibility.
this also working .Should I change this in my PR ?
this also working .Should I change this in my PR ?
@Kaushik1216 There is an older PR for the same thing, as already discussed. The same proposal has been made to the author of that PR, see #37898 (comment) . If he does not want to change his PR, then feel free to take over and continue with yours. But if he will make that change, we will use his PR because he was first.
In general it is not very friendly just to take over the work from another PR if the author hasn't abandoned his PR, and it's also not very effective if several people are doing the same (or nearly the same) for the same issue.
Tested the
$template->extension = explode('.', $key)[0];
works perfectly, but we still need to remove the tags array() wrap because we are sending an assoc array as the parameter. So line 401 needs to be
$params->tags = $tags;
OR edit the comment at the head of the function to state csv string of variable names.
should we wait more for other person to response ? As It is inactive for long time
I tested this from the perspective of including the extension element in the database but there is still the problem of the tags being set as an array when an array is passed as a parameter, or am I missing something? If I use the existing code with this change included the tags passed as an array and then encased as an array so I think Line 401 should be changed from
$params->tags = array($tags);
to
$params->tags = $tags;
Apologies if I've missed something due to my inexperience. Cheers.
@garkell
I don't disagree, I'm just irritated. In the docBlock I see:
@param array $tags Associative array of tags to replace
In your example code on #39480 (comment)
you pass over array("name","sitename","link_text")
which isn't an ASSOCIATIVE(!) array as far as I know. So, the DocBlock must be corrected, too? When I look into the database it looks like that.
should we wait more for other person to response ? As It is inactive for long time
You don't have to wait and can prepare your pr for tests but you should be aware that if @rigin continues his pr any time soon (we should understand that some people on earth have more serious problems at the moment) that yours will be closed.
Category | Libraries | ⇒ | Administration Language & Strings Libraries |
Category | Libraries Administration Language & Strings | ⇒ | Libraries |
Labels |
Added:
Language Change
|
@Kaushik1216
I think, after one month of waiting you can continue here if you still want to.
But be aware that I'm only a contributor like you. I have nothing to decide here ;-)
Labels |
Removed:
Language Change
|
Labels |
Added:
?
|
It almost works.
Please also fix the Tags, change this:
$params->tags = [$tags];
to
$params->tags = (array) $tags;
In both createTemplate
and updateTemplate
methods.
It almost works.
Please also fix the Tags, change this:
$params->tags = [$tags];
to
$params->tags = (array) $tags;
In both
createTemplate
andupdateTemplate
methods.
done
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Please Merge this PR !
@Kaushik1216 Congrats for your PR set to RTC :)
Please be patient - release managers decide when a PR can be merged, following their version planning.
This pull request has been automatically rebased to 4.3-dev.
Labels |
Added:
?
bug
|
Labels |
Added:
PR-4.3-dev
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-05-06 21:51:27 |
Closed_By | ⇒ | obuisard |
The fix is in! Thank you @Kaushik1216 for the PR
@Kaushik1216 Please fix the code style (PHPCS) errors reported here: https://ci.joomla.org/joomla/joomla-cms/60462/1/6 . Thanks in advance.