Questions tagged [modx]

MODX (also known as MODX Revolution) is an open source CMS and web application framework written in PHP, using a MySQL or MSSQL database backend.

MODX is an open source CMS and web application framework written in PHP.

Content management is achieved with a simple document tree. Reusable, repeated HTML snippets are referred to as "chunks" and can be incorporated into templates. PHP code can be used similarly and is referred to as "snippets".

Download the latest MODX version

1039 questions
2
votes
4 answers

Display ModX placeholders as code in ModX resource?

I want to share some ModX template code I've made on my ModX site. I can paste the html in fine using
 but the chunks, eg [[$footer]] [[$header]] and placeholders, eg [[*content]] still display as ModX Placeholders meaning I see the contents of…
MeltingDog
  • 14,310
  • 43
  • 165
  • 295
2
votes
2 answers

How to convert SQL where LENGTH() condition to xPDO?

How do I express the where clause in this: select * from TABLE where LENGTH(COLUMN) > 0 in xPDO? $criteria->where(array('LENGTH(customer_po_num):>' => '0')); does not work, it results in something like…
Sean Kimball
  • 4,506
  • 9
  • 42
  • 73
2
votes
1 answer

Returned array yields unexpected result

I have a modx revolution snippet [ajax processor actually] that passes some data to another snippet calling a function... runSnippet($_POST['snippet'],array( …
Sean Kimball
  • 4,506
  • 9
  • 42
  • 73
2
votes
1 answer

ModX site hacked ... "stat.rolledwil.biz" ... how do I clean?

Our modx site now has this line injected at the end of every page: right before the final tag! How do I get rid of this?
Dan
  • 1,257
  • 2
  • 15
  • 31
2
votes
1 answer

predefine template for new resource/document

I would like to set the new child documents to default to a set template that is different from the parent. I've looked through managermanager, but looks like it is unable to do this. mm_inherit can only inherit from a parent and mm_default does not…
Daniel
  • 34,125
  • 17
  • 102
  • 150
2
votes
2 answers

duplicating modx revo install

I'd like to do some changes to a modx revo install through a staging subdomain, with a separate database. What's the easiest way of doing this? I've been battling with this for two days. I'm trying a new install now and replacing content,…
Daniel
  • 34,125
  • 17
  • 102
  • 150
2
votes
6 answers

Users get logged in automatically as different user

This sounds very weird. But currently users of our site is seeing this behavior randomly. When they browse anonymously the site they gets logged in as a different user. They got logged in as users which is actually currently logged into the system.…
chanchal118
  • 3,551
  • 2
  • 26
  • 52
2
votes
1 answer

Configuring MODx Revolution to work with both http and https

I have a website using MODx Revolution (2.2.10-pl, advanced install), let's call it www.example.com, which I want to be accessible with both http and https. to achieve this, I tweaked the site_url context setting to be…
Silly Freak
  • 4,061
  • 1
  • 36
  • 58
2
votes
5 answers

Output modifier on modx placeholder is not working

I have this code in a template [[+isShowMore:is=`1`:then=`show more`:else=`no`]] It is printing no. But it should show show more as placeholder isShowMore is set to 1 by this line of code in a snippet. $modx->setPlaceHolder('isShowMore', 1); Also…
chanchal118
  • 3,551
  • 2
  • 26
  • 52
2
votes
3 answers

New install of ModX Revo 2.2.10 - Get 'Unexpected token <:' on every manager page

I've just installed Revo 2.2.10. Whenever I open a new page in manager I get a pop up box saying Unexpected token <: Would anyone know what this means and what I can do to fix it? (Ive installed ModX in a subdirecty, but am not using FURLs yet if…
MeltingDog
  • 14,310
  • 43
  • 165
  • 295
2
votes
3 answers

Anchor tags not working in CMS (ModX)

I am using the latest ModX Revolution CMS which has both a dynamically created menu and content. I have my menu set up as such: About Us And, in my content:

About us

But upon…
MeltingDog
  • 14,310
  • 43
  • 165
  • 295
2
votes
3 answers

MODX empty dashboard

I'm using MODX the first time and it all worked since yesterday. I didn't change anything and the dashboard and the package manager worked without any problems but since yesterday I couldn't see the dashboard itself, just the top navigation menu in…
David
  • 560
  • 2
  • 10
  • 26
2
votes
1 answer

$modx->query doesn't seem to execute

As per the documentation here: http://rtfm.modx.com/display/xPDO20/xPDO.query Which shows the following as an example: $result = $modx->query("SELECT * FROM modx_users WHERE id=1"); if (!is_object($result)) { return 'No result!'; } I would…
ahren
  • 16,803
  • 5
  • 50
  • 70
2
votes
3 answers

How do I configure a 404 error page in MODX?

http://www.example.com/test1 http://www.example.com/test2 http://www.example.com/test3 all of these are non-existent pages and redirects to the index.php page, the search engines marks those links as duplicates, they return 200 ok, how to make them…
Zecrow
  • 233
  • 3
  • 8
2
votes
2 answers

My FormIt hook gets cached and it's screwing up every run after the 1st

I have the following snippet code hooked up to a FormIt email form: $tv = "taken" . (int)$hook->getValue('datetime'); $docID = $modx->resource->get('id'); //get the page id $page = $modx->getObject('modResource', $docID); $current =…
kotekzot
  • 1,518
  • 1
  • 14
  • 23