Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
[This thread was moved from Failing elementary TXP-fu: status=sticky article fails to load in order to give it a more descriptive title.]
Hi!
I set up a contact page on a new website I’m working on, just like a dozen or more other contact pages I’ve created using TXP. First I created a section called `contact`, then I created a new view section-specific form called `_content-contact`, which is loaded via the `default` page template using rah_output_section_form — here is the relevant code:
From Page `default`:
<txp:rah_output_section_form prefix="_content-" default="_content"/>
Form `_content-contact`:
<txp:article limit="1" status="sticky">
<!-- Output article content -->
</txp:article>
<txp:zem_contact to="me@myemail.com">
<!-- Output form content -->
</txp:zem_contact>
After that, I created an article† in the `contact` section, set the status to `sticky`, and published it. On my development install, the article loads perfectly when I visit the `contact` section’s url, but on the publish install, I get a totally unexpected behavior: The `zem_contact` form loads fine, but the article does not.
Here’s the excerpt from the tag trace that seems relevant:
<txp:rah_output_section_form prefix="_content-" default="_content"/>
[SQL (0.00067400932312012): select Form from txp_form where `name` = '_content-contact' limit 1]
<txp:article limit="1" status="sticky">
[SQL (0.0016438961029053): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from l10n_txp_en_us where 1=1 and Status = 5 and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Section IN ('contact') order by Posted desc limit 0, 1]
</txp:article>
<txp:zem_contact to="me@myemail.com">
[SQL (0.00043582916259766): insert into txp_discuss_nonce set issue_time = now(), nonce = 'badedbe8472206de5501d72422e753ba']
<!-- Form fields -->
</txp:zem_contact>
Visiting the article-specific URL generates a 404 error, without a relevant tag-trace.
When I run the article’s select
query in MySQL (SQL (0.0016438961029053)
above) on the publish server, it returns no records. When I run select * from textpattern where section='contact' and status='5'
on the same database, it shows me the record that I want to load.
†: Two articles actually. Since this site uses MLP, I entered one article in English and one in Spanish. Neither are returned by the SQL query generated by Textpattern’s article tag, and both are returned by my SQL query.
I can’t figure out what’s going on or how to troubleshoot further. Please let me know if you have any ideas! Thanks!
Last edited by johnstephens (2011-01-31 20:54:49)
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
HI john,
Could you confirm that the corresponding articles have been created in the l10n_txp_en_us (andl10n_txp_es_es)?
It seems that the article/s has/have been created in the textpattern table, but the corresponding references in the rendition table are missing.
Also, related: have you properly installed the MLP in the public server?
Hope this helps you to track down the issue.
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Thanks, maniqui!
Both renditions appear in the MLP “Article” sub-tab without any indications of an error.
Here’s what I’ve found:
- There is a record for this article group in `l10n_articles`, with the correct article IDs for each language in the `members` field.
- There is no record of either article in the `l10n_txp_en_us` or `l10n_txp_es_es`tables. The `en_us` table stopped tracking articles after group 80 and the `es_es` table has no entries after group 79. The most recent article group is 105.
I don’t know why it stopped working— I installed it according to the instructions, and it worked perfectly until the above hickup. How can I identify how the problem cropped up and repair the affected tables?
Thanks again for your help! We know more than we did before.
Offline
#4 2011-01-31 20:00:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
If you can find the articles in the textpattern table, and not in their respective language tables, it gives me the impression that you didn’t create them by cloning the original article, but in another way. Could that be the case? As far as I know cloning is the only way to add articles to the language tables.
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Thanks, Els!
I created the initial article in English using TXP’s Write tab, not via the MLP interface. I cloned the Spanish version using the MLP tab. As far as I know, that’s the way all the article groups were created.
I want to check my installation against the latest stable release to make sure everything matches, but txpforge.org isn’t currently loading at my location.
Feel free to let me know if you get any ideas or note any obvious blunders on my part! Should I migrate this discussion to the MLP support thread?
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Re: TXP Forge — It’s not just me.
Offline
#7 2011-01-31 20:09:28
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Offline
#8 2011-01-31 20:13:52
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
johnstephens wrote:
I created the initial article in English using TXP’s Write tab, not via the MLP interface. I cloned the Spanish version using the MLP tab. As far as I know, that’s the way all the article groups were created.
I don’t see anything wrong there.
I want to check my installation against the latest stable release to make sure everything matches, but txpforge.org isn’t currently loading at my location.
For the time being, you can get it here. Use this only with Txp 4.3.0, if you’re still using 4.2.0, get this one.
Should I migrate this discussion to the MLP support thread?
We can’t merge topics :( so let’s leave it here.
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Aha! I may have identified the problem. Apropos of this :
Incompatible with glz_custom_fields when adding additional fields… This was due to glz_cf altering the structure of the textpattern table (adding or deleting extra custom-field columns.)
The “status” of the issue says “Done”, but I can confirm that the tables fell out of sync right after I installed the latest version of glz_cf and added fields. Is there an easy way to bring them back in sync?
Thanks for posting the links! I will check my installation now just to make sure everything is tucked in properly!
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Oh, and this site still uses TXP 4.2, but I want to upgrade to 4.3. Obviously, I won’t be doing that until I get the MLP working again.
Offline
#11 2011-01-31 20:23:33
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
johnstephens wrote:
I can confirm that the tables fell out of sync right after I installed the latest version of glz_cf and added fields. Is there an easy way to bring them back in sync?
I recently read something here about this… now trying to remember where I saw that…
Offline
Re: Article fails to load w/ MLP & glz_cf [mv Failing elementary TXP-fu]
Your response to this post is what alerted me to the possibility.
Offline