Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2018-11-15 18:09:36

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

The rubber duck strikes again!


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#26 2018-11-16 08:41:31

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

There seems to be a problem.

In the article_list of the blog section. All articles are listed just fine (10/page) up to p56 but from p57 onwards the number of articles appearing seems to be random

for example

p57 shows 7 articles
p60 just 1
p63 shows 3 articles

I have no idea why this is happening unless I made a mistake when I was merging the dbs.

As a second point, according to the count using <txp:article_custom section="blog" pageby="1" pgonly /> the blog section in theory has 1662 articles so the 167 pages is correct.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#27 2018-11-16 08:57:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,093
Website

Re: transfer over 1600 articles

Please humour me a moment. If you know of an article that you expect to show up on those pages with missing entries, find it in the admin side, open it in the Write panel and just save it. Does it then appear in the list on the site?

If so, it’s a random textile encoding issue that we see from time to time. Never got to the bottom of it.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#28 2018-11-16 09:24:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

Bloke wrote #315288:

Please humour me a moment. If you know of an article that you expect to show up on those pages with missing entries, find it in the admin side, open it in the Write panel and just save it. Does it then appear in the list on the site?

If so, it’s a random textile encoding issue that we see from time to time. Never got to the bottom of it.

Good catch Stef! Indeed it does… So I’ll have to re-save over 1000 articles again? Or is there a way to do this automatically?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#29 2018-11-16 09:55:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,093
Website

Re: transfer over 1600 articles

colak wrote #315289:

So I’ll have to re-save over 1000 articles again? Or is there a way to do this automatically?

Ouch, 1000 articles is going to hurt. You could try sed_textile_upgrade after backing up. I’ve had mixed results. Sometimes it works a treat and other times it doesn’t. You might be lucky: it trawls through your database and fakes a “save” on all articles.

There might be a better way to do it.

I really wish I understood why this happens. But then I also wish I understood why Textile sometimes screws up simple lists and renders things like:

1. item 1
2. item 2

# item 3

4. item 4
...

Deleting the ‘#’ marks and newlines surrounding the broken entry, then typing them in again and saving the article fixes it. Merely saving again doesn’t. Does the same with asterisk lists sometimes too… but not all the time. Does it in articles and on the forum here for me occasionally. Totally weird.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#30 2018-11-16 11:59:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

I had that issue with lists too! I always thought that it was a problem with my server.

I have used sed_textile_upgrade and no cigar:( I have also saved 1000+ articles again… Some of the pages with problems are OK now but there still seem to be a lot which are not appearing in the list view

p68 for example has 9 articles, p 70, only two… These are just from random clicks.

I used to use a lot of html in my posts in the early days, and I am not sure if that is part of the issue.

I’ll have to do some digging in, and report back.

Meanwhile, is there a way to check if the structure of the sql textpattern table is OK, or would it just not work if there was a problem there?


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#31 2018-11-16 13:15:13

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,093
Website

Re: transfer over 1600 articles

colak wrote #315312:

I had that issue with lists too!

Glad it’s not just me! If it was reproducible under controlled circumstances I’d report it as a bug. EDIT: I’ve opened a separate topic to investigate.

I have used sed_textile_upgrade and no cigar:(

Damn. It shouldn’t be hard to programmatically go through each article and run the raw body+excerpt through textile then update the row and stuff the result in the cooked columns. That’s all Steve’s plugin does, but maybe the fields are different now or something. The plugin is five years old.

is there a way to check if the structure of the sql textpattern table is OK…

Yes. You can do a repair (rss_db_admin_manager has this feature) but I doubt it’ll help. If the structure was not intact, Textpattern would fall over big time.

Last edited by Bloke (2018-11-16 13:24:33)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#32 2018-11-16 16:20:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,090
Website

Re: transfer over 1600 articles

colak wrote #315312:

p68 for example has 9 articles, p 70, only two… These are just from random clicks.

Can you put on debugging and check the tag trace. If there’s a way to see what the SQL query is, that might give you a clue. If the query already has incorrect offset and limit, you don’t need to search any further in the individual articles.

Another / a further option – if you think it’s something about the article content – might be to simplify your form for the moment to just output txp:title (and also your txp:article / article_custom tag) and see if it still occurs. If not, start adding back in the parts of your form until you discover where it might be tripping up.

FWIW: p68 seems fine to me but p70, 71, 72 are all short as you say.


TXP Builders – finely-crafted code, design and txp

Offline

#33 2018-11-16 16:54:14

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

Hi,

I have the tag trace for p72 on the pastebin.

I see some info there which does not exist, either on the article or the database.

ie Textpattern Notice: Form not found. opportunities while parsing form <strong>None</strong> on page <strong>Blog</strong>. Neither the old site nor the new one have a form called opportunities although 10 years ago i think that I was using override forms and opportunities might have been the name of an article form.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#34 2018-11-16 17:05:10

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,090
Website

Re: transfer over 1600 articles

colak wrote #315318:

I have the tag trace for p72 on the pastebin.

Thanks. The offset and limit of the query seems to be correct at least.

… 10 years ago i think that I was using override forms and opportunities might have been the name of an article form.

That might be a hint. Have a look at the database in phpMyAdmin or Sequel Pro or similar, and try sorting the textpattern table by the column override_form (possibly also filter by section blog if you are using override forms elsewhere). Then check if those articles with an override form are among those that are missing.
Alternatively try and locate the blog articles from the date where you think some are missing, and see if you can determine whether a missing article using override form…


TXP Builders – finely-crafted code, design and txp

Offline

#35 2018-11-16 17:24:29

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

I deleted all 51 override form names in PhPMyAdmin but a debug view of the same page is insisting…

[SQL: SELECT Form FROM txp_form WHERE name = 'opportunities' AND skin = 'neme960' ]

I am wondering if it will make any difference if I change all 'opportunities' in the sql backup of the table to '' and then replace the table via the terminal.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

#36 2018-11-16 17:50:08

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 8,554
Website

Re: transfer over 1600 articles

That seems to have done it!

A note for others who may face the same problem.

Changing the column content in PhpMyAdmin does not seem to be having any effect.

I actually searched and replaced all records in TextEdit, dropped the textpattern table in phpMyadmin and re-uploaded the modified one using the terminal. Random clicks now all appear to be having 10 articles.


Yiannis
——————————
neme.org | hblack.net | State Machines | NeMe @ github
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB