<![CDATA[ Length of wrong with old articles - My Forums]]> https://forums.modx.com/thread/?thread=104986 <![CDATA[Length of wrong with old articles]]> https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564502 A friend asked me to look into what seems a bug (see picture). The pagetitle of a stored post shows strange numbers and I need to extend the length of the editor field (the DB table field should be fine). I browsed through many forum posts, but couldn't find a workaround so far. Can you point me in the right direction?

Many thanks.
Cercamon

MODX version:
MODX Revolution 2.7.1-pl (traditional)]]>
cercamon Mar 20, 2019, 11:11 AM https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564502
<![CDATA[Re: Length of wrong with old articles]]> https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564537 I tried deactivating SEO Pro and the editing form chenged back to normal and it all works as expected. No more warning when confirming the changes of an article.

Is this a known issue by the ModX community? Is there a workaround or a way to keep both plugins active and live happily ever after? ;-)

Many thanks.]]>
cercamon Mar 21, 2019, 08:57 PM https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564537
<![CDATA[Re: Length of wrong with old articles]]> https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564533 Quote from: andytough at Mar 20, 2019, 10:28 PM
I see from 'pagetitle2.png that the site is using an extra called Articles. https://docs.modx.com/extras/revo/articles

I have not got any experience of using Articles but I have had a quick play with it. It seems that Articles uses the same field for its title that a normal MODX resource would use. However Articles applies the 70 character limit itself, causing the failure to save the resource if 70 characters are exceeded.

I think there are two courses of action available to you.

1. There is a system setting for Articles that allows you to switch on the Long Title field. Although it says this is limited to 70 characters it does not actually apply the limit. You could use the Long Title field in your Articles page template instead of the standard Title field.

2. Take a look at the Articles snippet and see if you can find where it applies the restriction - and hack it to stop it from doing that. I had a quick look and couldn't see anything obvious.


Hi Andy,

yes, the Articles plugin is in use. Thank you for indicating what to do next. I have tried number 2 (hacking the Articles snippet and remove the controls) but as you did, I could not find a point in the code where the controls are made. Something in /assets/components/Articles/js/extras suggest that Javascript controls on the data fields are performed there (create.js, update.js) but so far no luck - pagetitle appears in some structures and maxlength is apparently ok (255). Maybe it's not the right place to look at.

The number 1 solution seems more viable, but I'm stuck because of lack of ModX knowledge. I mean, I can see the templates of the frontend where blog articles are retrieved from the DB and displayed to the web user, but I can't find the corresponding backend page templates where I can replace +pagetitle with +longtitle, or something like that.

Any further idea?

Many thanks.
]]>
cercamon Mar 21, 2019, 01:46 PM https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564533
<![CDATA[Re: Length of wrong with old articles]]> https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564521 https://docs.modx.com/extras/revo/articles

I have not got any experience of using Articles but I have had a quick play with it. It seems that Articles uses the same field for its title that a normal MODX resource would use. However Articles applies the 70 character limit itself, causing the failure to save the resource if 70 characters are exceeded.

I think there are two courses of action available to you.

1. There is a system setting for Articles that allows you to switch on the Long Title field. Although it says this is limited to 70 characters it does not actually apply the limit. You could use the Long Title field in your Articles page template instead of the standard Title field.

2. Take a look at the Articles snippet and see if you can find where it applies the restriction - and hack it to stop it from doing that. I had a quick look and couldn't see anything obvious.

]]>
andytough Mar 20, 2019, 10:28 PM https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564521
<![CDATA[Re: Length of wrong with old articles]]> https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564520 Quote from: andytough at Mar 20, 2019, 04:29 PM
Is the site using the Seo Pro? https://modx.com/extras/package/seopro

If it is can you check that it has been updated to the latest version?

When reporting how many characters are included in the title SEO Pro adds in the number of characters (including white space) that are in the site name.

So for example a page with this title: Lorem Ipsum
On a site called: Ipsum Generator Website
That is set to have this charcter between the page title and the site name: |
Would render as: Ipsum Generator Website | Lorem Ipsum

SEO Pro would display 37/70 about the Title field, when the title is actually 11 characters long.

The number displayed is only a guide, for SEO purposes. It does not affect the number of characters you can store.

I believe the MODX pagetitle field is set to varchar(255), so 255 characters would be your actual limit.

Many thanks for your reply. Yes, the web site is using SEO Pro and I've checked it is the last version available.

The problem is that when I try to edit the title and make it longer (but surely less than 100 chars, I still get the error you see in picture attached.
How can I prevent the website name to be put before the actual title I want to give...? I understand the SEO features but this is quite annoying.]]>
cercamon Mar 20, 2019, 09:18 PM https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564520
<![CDATA[Re: Length of wrong with old articles]]> https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564510 https://modx.com/extras/package/seopro

If it is can you check that it has been updated to the latest version?

When reporting how many characters are included in the title SEO Pro adds in the number of characters (including white space) that are in the site name.

So for example a page with this title: Lorem Ipsum
On a site called: Ipsum Generator Website
That is set to have this charcter between the page title and the site name: |
Would render as: Ipsum Generator Website | Lorem Ipsum

SEO Pro would display 37/70 about the Title field, when the title is actually 11 characters long.

The number displayed is only a guide, for SEO purposes. It does not affect the number of characters you can store.

I believe the MODX pagetitle field is set to varchar(255), so 255 characters would be your actual limit.
]]>
andytough Mar 20, 2019, 04:29 PM https://forums.modx.com/thread/104986/length-of-wrong-with-old-articles#dis-post-564510