Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sitemap filename can't exceed 32 characters #13937

Closed
erikhansen opened this issue Mar 3, 2018 · 7 comments
Closed

Sitemap filename can't exceed 32 characters #13937

erikhansen opened this issue Mar 3, 2018 · 7 comments
Assignees
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@erikhansen
Copy link
Contributor

erikhansen commented Mar 3, 2018

Issue: Sitemap filenames can't exceed 32 characters.

Preconditions

  1. Install Magento Open Source 2.2.3

Steps to reproduce

  1. Go to MARKETING > Site Map
  2. Click Add Sitemap
  3. Enter a filename that exceeds 32 characters (for example thisisareallylongsitemapnamethatexceeds32characters.xml)
    image
  4. Click Save & Generate

Expected result

  1. The thisisareallylongsitemapnamethatexceeds32characters.xml file should get created in the /pub/ directory.

Actual result

  1. The success message includes a truncated filename:
    magento admin-h1b3c
  2. Sitemap file gets truncated:
    current ssh -peo5f

Additional Details

The sitemap_filename field is a VARCHAR(32), which explains why this issue is happening:

CREATE TABLE `sitemap` (
  `sitemap_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Sitemap Id',
  `sitemap_type` varchar(32) DEFAULT NULL COMMENT 'Sitemap Type',
  `sitemap_filename` varchar(32) DEFAULT NULL COMMENT 'Sitemap Filename',
  `sitemap_path` varchar(255) DEFAULT NULL COMMENT 'Sitemap Path',
  `sitemap_time` timestamp NULL DEFAULT NULL COMMENT 'Sitemap Time',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store id',
  PRIMARY KEY (`sitemap_id`),
  KEY `SITEMAP_STORE_ID` (`store_id`),
  CONSTRAINT `SITEMAP_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='XML Sitemap';
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 3, 2018
@erikhansen
Copy link
Contributor Author

I just tested changing the VARCHAR length limit on the sitemap field. After running the query below, I was able to create a sitemap name that was up to 255 characters in length.

ALTER TABLE `sitemap` CHANGE `sitemap_filename` `sitemap_filename` VARCHAR(255)  CHARACTER SET utf8  COLLATE utf8_general_ci  NULL  DEFAULT NULL  COMMENT 'Sitemap Filename';

@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Mar 5, 2018
@magento-engcom-team
Copy link
Contributor

@erikhansen, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Mar 5, 2018
@osrecio
Copy link
Member

osrecio commented Mar 7, 2018

Hi @erikhansen ,

We can adjust the column length and add validation in the form.

I think 255 chars should be enough to store a filename, following Limits of filename

What do you think?

@osrecio osrecio self-assigned this Mar 7, 2018
@erikhansen
Copy link
Contributor Author

@osrecio I agree that 255 characters should be sufficient.

@irajneeshgupta irajneeshgupta self-assigned this Jan 2, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 2, 2019

Hi @irajneeshgupta. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:

  • 1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 2. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 3. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 4. If the issue is not relevant or is not reproducible any more, feel free to close it.

@magento-engcom-team
Copy link
Contributor

Hi @erikhansen. Thank you for your report.
The issue has been fixed in #20044 by @irajneeshgupta in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Mar 1, 2019
magento-engcom-team added a commit that referenced this issue Mar 1, 2019
 - Merge Pull Request #20044 from irajneeshgupta/magento2:irajneeshgupta-patch-13937
 - Merged commits:
   1. 55cf2dc
   2. 035e8d7
magento-engcom-team added a commit that referenced this issue Mar 1, 2019
 - Merge Pull Request #20044 from irajneeshgupta/magento2:irajneeshgupta-patch-13937
 - Merged commits:
   1. 55cf2dc
   2. 035e8d7
   3. 417ffa2
   4. e9f4981
magento-engcom-team added a commit that referenced this issue Mar 1, 2019
 - Merge Pull Request #20044 from irajneeshgupta/magento2:irajneeshgupta-patch-13937
 - Merged commits:
   1. 55cf2dc
   2. 035e8d7
   3. 417ffa2
   4. e9f4981
   5. 94c176f
amol2jcommerce pushed a commit to amol2jcommerce/magento2 that referenced this issue Mar 1, 2019
irajneeshgupta pushed a commit to irajneeshgupta/magento2 that referenced this issue Mar 2, 2019
@Ctucker9233
Copy link

Does a new backport need to be created?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

6 participants