2.5.0 RC3 related issues

Please report bugs here!

Moderator: Thorsten

kjusupov
Posts: 36
Joined: Fri Jul 03, 2009 2:06 am

2.5.0 RC3 related issues

Post by kjusupov »

Hi guys,

I've done a fresh install of 2.5.0-rc3 and below are some issues:

1. Delete FAQ:

Code: Select all

phpMyFAQ warning [2]: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "0.000000" LINE 1: DELETE FROM 0.000000aqcategory_user WHERE record_id = 1 AND ... ^ in Pgsql.php on line 91
2. You can comment this FAQ link is broken it shows the error message: "The URL is not valid and cannot be loaded", but it loads OK...

Code: Select all

http:///?action=artikel&cat=1&id=4&artlang=en#comment
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.5.0 RC3 related issues

Post by Thorsten »

Hi,

thanks for testing. Both issues are now fixed in SVN.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
kjusupov
Posts: 36
Joined: Fri Jul 03, 2009 2:06 am

Re: 2.5.0 RC3 related issues

Post by kjusupov »

Steps to reproduce:

1. Click on Advanced Search
2. Type in search string
3. Click on search

Code: Select all

phpMyFAQ warning [2]: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "AND" LINE 1: ...'%xax%') AND (faqcategoryrelations.category_id = AND faqdat... ^ in Pgsql.php on line 91
UPDATE:
From PostgreSQL log file, "faqcategoryrelations.category_id" does not have a value:

Code: Select all

SELECT faqdata.id AS id, faqdata.lang AS lang, faqcategoryrelations.category_id AS category_id, faqdata.thema AS thema, faqdata.content AS content FROM faqdata LEFT JOIN faqcategoryrelations ON faqdata.id = faqcategoryrelations.record_id AND faqdata.lang = faqcategoryrelations.record_lang  WHERE (faqdata.thema|| ' ' ||faqdata.content|| ' ' ||faqdata.keywords) ILIKE ('%a%') AND (faqdata.lang = 'en' AND faqcategoryrelations.category_id =  AND faqdata.active = 'yes')
Last edited by kjusupov on Mon Jul 13, 2009 4:57 am, edited 1 time in total.
kjusupov
Posts: 36
Joined: Fri Jul 03, 2009 2:06 am

Re: 2.5.0 RC3 related issues

Post by kjusupov »

By default the focus remains on "search" input field:
* When I click on "Advanced Search", the default focus should be in the first input field of the fieldset "Keyword"
** Maybe the fieldset should be renamed as "Advanced Search"?
* When I click on "Add FAQ", the default focus should be in the first input field of the fieldset "Proposal for a new FAQ"
* When I click on "Ask question", the focus should be in the first input field of the fieldset "Ask question"
* Same for "Contact"
kjusupov
Posts: 36
Joined: Fri Jul 03, 2009 2:06 am

Re: 2.5.0 RC3 related issues

Post by kjusupov »

An error when vote is submitted, but the vote itself gets registered correctly:

Code: Select all

phpMyFAQ warning [2]: pg_query() [function.pg-query]: Query failed: ERROR: operator does not exist: character varying > integer LINE 6: ... artikel = 4 AND (ip = '::1' AND datum > 12474562... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. in Pgsql.php on line 91

phpMyFAQ warning [2]: pg_num_rows() expects parameter 1 to be resource, boolean given in Pgsql.php on line 176
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.5.0 RC3 related issues

Post by Thorsten »

Hi,
kjusupov wrote:By default the focus remains on "search" input field:
* When I click on "Advanced Search", the default focus should be in the first input field of the fieldset "Keyword"
** Maybe the fieldset should be renamed as "Advanced Search"?
* When I click on "Add FAQ", the default focus should be in the first input field of the fieldset "Proposal for a new FAQ"
* When I click on "Ask question", the focus should be in the first input field of the fieldset "Ask question"
* Same for "Contact"
hm... I think about a better solution instead of the focus on the search input field. But it's not a show stopper for me. :-)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Re: 2.5.0 RC3 related issues

Post by rom »

Sorry for abusing this thread for our problem, but it just fits in here:

We just upgraded from 2.0.x to 2.5.0 RC3 and have the following problem...

Base URL in the Configuration Settings:
http://intranet.company.de/faq

In our article, we use the following code:

Code: Select all

<a href="http://intranet.company.de/faq/index.php?action=artikel&cat=8&id=50&artlang=de">HP LaserJet 2300</a>
Strange thing is, the hyperlink in the article links to the following address:

Code: Select all

http://intranet.company.de/faq/index.phptranet.company.de/faqindex.php?action=artikel&cat=8&id=50&artlang=de
---------
German
--------
In der artikel.php habe ich gesehen, dass eine art link-replacement stattfindet für links welche auf die eigene phpmyfaq-installation zeigen. aber wieso die links dabei auf diese art verhauen werden ist mir nicht klar... vor allem da ja das "in" im string "intranet.company.de" extra rausgekürzt wird... also irgendwas stimmt da nicht.
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.5.0 RC3 related issues

Post by Thorsten »

Hi,

where does this happen?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Re: 2.5.0 RC3 related issues

Post by rom »

hm... not sure if Im understanding your question..

It happens in our intranet, in Germany, in the article view :P
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.5.0 RC3 related issues

Post by Thorsten »

Hi,

passiert das bei allen Links oder nur bei bestimmten Links in den Artikeln? Sind die Links in der Datenbank korrekt?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Re: 2.5.0 RC3 related issues

Post by rom »

dies passiert nur bei links, welche auf artikel in der eigenen phpmyfaq-installation verlinken.
die links sind in der Datenbank korrekt, und werden nur bei der frontend-ausgabe abgeändert.

ich habe nicht viel ahnung von php, aber ich vermute der link aus der datenbank wird in der artikel.php irgendwo zwischen zeile 109 und zeile 143 abgeändert:

Code: Select all

// Hack: Apply the new SEO schema to those HTML anchors to
//       other faq records (Internal Links) added with WYSIWYG Editor:
//         href="index.php?action=artikel&cat=NNN&id=MMM&artlang=XYZ"
// Search for href attribute links
$oLnk->resetPool();
$oLnk->parse_string($content);
$fixedContent = $content;

// Search for href attributes only
if (isset($oLnk->urlpool['href'])) {
    $linkArray = array_unique($oLnk->urlpool['href']);
    foreach ($linkArray as $_url) {
        if (!(strpos($_url, 'index.php?action=artikel') === false)) {
            // Get the Faq link title
            preg_match('/id=([\d]+)/ism', $_url, $matches);
            $_id   = $matches[1];
            preg_match('/artlang=([a-z\-]+)$/ism', $_url, $matches);
            $_lang = $matches[1];
            $_title = $faq->getRecordTitle($_id, false);
            $_link = substr($_url, 9);
            // Move the link to XHTML
            if (strpos($_url, '&') === false) {
                $_link = str_replace('&', '&', $_link);
            }
            $oLink            = new PMF_Link(PMF_Link::getSystemRelativeUri().$_link);
            $oLink->itemTitle = $_title;
            $oLink->tooltip   = PMF_htmlentities($_title, ENT_QUOTES, $PMF_LANG['metaCharset']);
            $newFaqPath       = $oLink->toString();
            $fixedContent     = str_replace($_url, $newFaqPath, $fixedContent);
        }
    }
}

$content = str_replace('href="#','href="index.php?action=artikel&lang='.$LANGCODE.'&id='.$record_id.'#', $fixedContent);
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: 2.5.0 RC3 related issues

Post by Thorsten »

Hi,

ich schau es mir an.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
rom
Posts: 15
Joined: Tue Jul 12, 2005 9:48 am

Re: 2.5.0 RC3 related issues

Post by rom »

Hi,

vielen dank für deine mühe!

Falls du noch Fragen hast, einfach melden. ;)
echarpie
Posts: 12
Joined: Fri May 22, 2009 10:24 pm

Re: 2.5.0 RC3 related issues

Post by echarpie »

I do not speak German, but I am having the same problem. I am also on 2.5.0 RC3. When I insert a link inside an FAQ answer the link address gets garbled up. For instance, I hightlight a word and insert a link to "http://prewrathministries.org/faq/index ... artlang=en" - after I save it, the link becomes "http://prewrathministries.org/faq/index ... artlang=en"
kjusupov
Posts: 36
Joined: Fri Jul 03, 2009 2:06 am

Re: 2.5.0 RC3 related issues

Post by kjusupov »

Same with me:

URL becomes:
http://faq.deimos/index.phpq.deimos/ind ... artlang=en

Note:
* The installation has URL: http://faw.deimos
* The link was actually to an existing record: http://faq.deimos/index.php?action=arti ... artlang=en

Also, the "sticky" tick-box does not take expected effect (before I saved, I ticked on "sticky"). But it does work when I go back to edit and tick the sticky box from the list (Edit FAQs fieldset, not edit page of the content).
Post Reply