Needs review
Project:
Node Teaser
Version:
5.x-1.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
11 Mar 2007 at 11:08 UTC
Updated:
3 Feb 2008 at 00:36 UTC
Jump to comment: Most recent file
I am dissappointed, I can't set format of text (PHP code, Full HTML, Filtered HTML, Texxy!, etc...) in teaser area. Format also isn't the same as was set in body area.
Have anyone idea what to do with this?
Another bug I have found is that area Teaser is not cloning by Clone module (node_clone-5.x-1.0-beta).
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | nodeteaser.patch | 11.71 KB | anantagati |
| #16 | nodeteaser_format_0.patch | 11.39 KB | anantagati |
| #15 | nodeteaser_format.patch | 11.71 KB | anantagati |
| #14 | nodeteaser_format.patch | 11.72 KB | anantagati |
| #11 | nodeteaser_update.patch | 11.71 KB | anantagati |
Comments
Comment #1
anantagati commentedComment #2
fxdxi commentedComment #3
toma commentedits important to add image and html code restrict to users...
Comment #4
moonray commentedAttached patch is against the DRUPAL-5 branch, and adds the following features:
- input format selector
- revisions
- diff module integration
Comment #5
lazly commentedTested with:
- revisions
- diff module integration
Works good, thanks!
Comment #6
fxdxi commentedIt does not work. Be Carefull!! The patch destoryed all previous teasers! and still does not work. (Off course, after patching the module I updated database.)
Now it shows those errors:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'teaser_format = 1 WHERE vid = 1057' at line 1 query: UPDATE nodeteaser SET teaser = 'H E R E I S T H E C O N T E N T O F T E A S E R B L O C K' teaser_format = 1 WHERE vid = 1057 in /var/www/DRUPAL_PREFIX/includes/database.mysqli.inc on line 151.The core is Drupal 5.5.
Comment #7
moonray commentedWere there any errors reported when updating the database?
It seems, from your error, that the update did not succeed. Try running /update.php, and
1) run the database upgrade script
2) click to expand Select versions
3) find nodeteaser module
4) set the drop-down box under it to 2
5) hit update
I hope that helps.
Comment #8
moonray commentedBTW, your teasers should all still be in the database. They're just not being picked up because it's looking for a particular revision (which it can't find). Your data is NOT LOST.
Comment #9
fxdxi commentedThe error after upgdating databse:
user warning: Duplicate entry '0' for key 1 query: ALTER TABLE nodeteaser DROP INDEX nid, ADD PRIMARY KEY vid (vid) in /var/www/web/includes/database.mysqli.inc on line 151.The following queries were executed
nodeteaser module
Update #2
* ALTER TABLE {nodeteaser} ADD vid int(10) NOT NULL DEFAULT '0' AFTER nid
* ALTER TABLE {nodeteaser} ADD teaser_format int(4) NOT NULL DEFAULT '0' AFTER teaser
* Failed: ALTER TABLE {nodeteaser} DROP INDEX nid, ADD PRIMARY KEY vid (vid)
* UPDATE {nodeteaser}, {node} SET {nodeteaser}.vid = {node}.vid, {nodeteaser}.teaser_format = 1 WHERE {nodeteaser}.nid = {node}.nid
Comment #10
fxdxi commentedWhen I do the missing step manualy later in phpMyAdmin:
ALTER TABLE `nodeteaser` DROP INDEX `nid`, ADD PRIMARY KEY (`vid`) ;it works. Because now (after the last step of UPDATE) the columm "vid" has unique values, not "0" as default for all lines.
Unhapilly, I must say that it still does not work.
The previous teasers are still not shown and when I try to write some new this error appear:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'teaser_format = 1 WHERE vid = 576' at line 1 query: UPDATE nodeteaser SET teaser = 'HERE IS TEASER' teaser_format = 1 WHERE vid = 576 in /var/www/web/includes/database.mysqli.inc on line 151.Comment #11
anantagati commentedAttached changed patch.
changed to:
Now it save teasers after node edit.
Comment #12
anantagati commentedI can confirm warning during update on website where nodes have already some saved teasers.
Comment #13
fxdxi commentedStill it does not work. For both of "Input format" forms (Body & Teaser) on edit page I can choose only one option.
Comment #14
anantagati commentedChoosing of input format should work now.
Comment #15
anantagati commentedI moved
$ret[] = update_sql("UPDATE {nodeteaser}, {node} SET {nodeteaser}.vid = {node}.vid, {nodeteaser}.teaser_format = 1 WHERE {nodeteaser}.nid = {node}.nid");before
$ret[] = update_sql("ALTER TABLE {nodeteaser} DROP INDEX nid, ADD PRIMARY KEY vid (vid)");So vid should be defined and warning when adding primary key should not be there.
Comment #16
anantagati commentedAdded FALSE as third paramether to calling of check_markup().
$node->teaser = check_markup($node->nodeteaser, $node->nodeteaser_format, FALSE);Without that users whose don't have permission to use format used for specific teaser will see 'n/a' instead of teaser text.
Comment #17
fxdxi commentedstill does not work.
patch < nodeteaser_format_0.patch
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urp new\nodeteaser.install orig\nodeteaser.install
|--- new\nodeteaser.install Mon Dec 24 15:45:11 2007
|+++ orig\nodeteaser.install Mon Dec 24 15:48:56 2007
--------------------------
File to patch:
Comment #18
anantagati commentedOh sorry, I swapped changed and original directory for patch. Now it should be ok.
Comment #19
fxdxi commentedThanks. But the directory is not the main problem.
patch < nodeteaser.patch
(Stripping trailing CRs from patch.)
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urp orig\nodeteaser.install new\nodeteaser.install
|--- orig\nodeteaser.install Mon Dec 24 15:48:56 2007
|+++ new\nodeteaser.install Mon Dec 24 15:45:11 2007
--------------------------
File to patch: nodeteaser.install
patching file nodeteaser.install
(Stripping trailing CRs from patch.)
can't find file to patch at input line 85
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -urp orig\nodeteaser.module new\nodeteaser.module
|--- orig\nodeteaser.module Mon Dec 24 15:48:56 2007
|+++ new\nodeteaser.module Mon Dec 24 15:48:35 2007
--------------------------
File to patch: nodeteaser.module
patching file nodeteaser.module
Hunk #1 FAILED at 23.
Hunk #2 FAILED at 34.
Hunk #3 FAILED at 104.
Hunk #4 FAILED at 160.
Hunk #5 FAILED at 215.
5 out of 5 hunks FAILED -- saving rejects to file nodeteaser.module.rej
Comment #20
justin3 commentedanother option is to apply the same filter to all teasers, but sorted by role
without needing any of the patches...
add a few lines to nodeteaser.module, at line 120 ~ delete one line (replaced by 3rd line below)
where $filter = the filter id, goto input formats and look at the 'configure' urls .../admin/settings/filters/?