Deleting a Job

Permalink Browser Info Environment
Hello,

How do I delete a job..?

At the moment in the dashboard job page I click on a job and select delete. In then states the job has been marked ready for delete...?

Type: Discussion
Status: New
obaudains
View Replies: View Best Answer
Tony replied on at Permalink Reply
Tony
what version of concrete5 are you running? and what packages are you running? (you can paste in the info from the text area on your concrete5 dashboard's environment page). I'm wondering if you're running one that just moves deleted pages to a recycle bin that needs to be emptied, or maybe there's been a change to how pages are deleted within a recent version of concrete5 that I'm not aware of.
obaudains replied on at Permalink Reply
obaudains
Info is as below - its the latest version.
When I click delete, it should delete.

It just says flagged for delete and stays live on the site...?

-----

# concrete5 Version
5.5.2.1

# concrete5 Packages
Advertisement (1.7.5), Ajax Form (1.3), Designer Content (3.1), Job Board (1.01), Page Redirect (1.4), Page Selector Attribute (1.1), Pro News (3.0.2).

# concrete5 Overrides
blocks/autonav, blocks/search, blocks/magazine_feature, blocks/connect_title, blocks/pronews_list, blocks/magazine_link, elements/header_required.php, single_pages/maintenance_mode.php, single_pages/login.php, themes/custom

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.3.13

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, filter, ftp, gd, gettext, hash, iconv, imap, intl, ionCube Loader, json, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, pgsql, Phar, posix, pspell, Reflection, session, SimpleXML, snmp, soap, sockets, SourceGuardian, SPL, SQLite, sqlite3, standard, suhosin, tidy, timezonedb, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
log_errors_max_len - 1024
max_execution_time - 5
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 90
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
safe_mode - Off
safe_mode_exec_dir - /usr/local/php/bin
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 16M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
suhosin.cookie.max_array_depth - 50
suhosin.cookie.max_array_index_length - 64
suhosin.cookie.max_name_length - 64
suhosin.cookie.max_totalname_length - 256
suhosin.cookie.max_value_length - 10000
suhosin.cookie.max_vars - 100
suhosin.executor.include.max_traversal - 0
suhosin.executor.max_depth - 0
suhosin.get.max_array_depth - 50
suhosin.get.max_array_index_length - 64
suhosin.get.max_name_length - 64
suhosin.get.max_totalname_length - 256
suhosin.get.max_value_length - 512
suhosin.get.max_vars - 100
suhosin.log.phpscript.is_safe - Off
suhosin.memory_limit - 0
suhosin.post.max_array_depth - 50
suhosin.post.max_array_index_length - 64
suhosin.post.max_name_length - 64
suhosin.post.max_totalname_length - 256
suhosin.post.max_value_length - 1000000
suhosin.post.max_vars - 1000
suhosin.request.max_array_depth - 50
suhosin.request.max_array_index_length - 64
suhosin.request.max_totalname_length - 256
suhosin.request.max_value_length - 1000000
suhosin.request.max_varname_length - 64
suhosin.request.max_vars - 1000
suhosin.session.max_id_length - 128
suhosin.upload.max_uploads - 25
Tony replied on at Permalink Reply
Tony
ok, I'll download the latest version of concrete5 and test it out on there and let you know what I find. Should have a solution for you in the next few days. In the meantime if it's urgent that you need to hide those pages then you could change their permissions so that only administrators can see them, or you could turn on the "hide from page list" attribute, so that it's excluded from the list of properties. Thanks.
Tony replied on at Permalink Best Answer Reply
Tony
so it looks like there's a new trash can folder. on your concrete5 dashboard's sitemap, click the options, and then the show system pages checkbox. then you'll see the trashcan. If you click on that trashcan, then you can empty the trash and it should disappear.

Also if you edit your listings page, you can get it to show only job listings below that page. If you do that then it should no longer display once it's moved to the trashcan.

You may also have you clear your concrete5 cache if you've got aggressive cache settings on there.
obaudains replied on at Permalink Reply 1 Attachment
obaudains
Thats worked great thank you.

There is another issue though. I have created a user group that will be the ones editing and adding the jobs. Using advanced permissions (which I use all the time) I have granted them full access to the jobs board page and also the composer section.

When they log in they can see these pages through the dashboard. In the jobs board they can se the list of jobs and edit them with no issue, however, if they click add new job they are redirected to a page that says 'server error'.

I have attached a screenshot with the link for you to debug.

FYI - I have cleared the cache, re-indexed the whole site and allowd full permissions to this page - The strange thing is the admin user group can add new jobs without any issue. Im assuming its an issue with permissions then.

Any assistance would be much appreciated .

(I can PM you login details to my demo server if its easier)

Thanks
obaudains replied on at Permalink Reply
obaudains
The error appears to be

Fatal error: Call to a member function getComposerBlocks() on a non-object in /home/levelmed/public_html/dev/bailiwick/concrete/models/composer_page.php on line 29
Tony replied on at Permalink Reply
Tony
honestly, this seems like more of a concrete5 core bug rather than anything specific to the Jobs package. It's just using a standard composer interface, but it looks like you've found a bug related to the non-admin user using that tool. I wonder if you tried this with a different version of concrete5 if the issue would be resolved?

here's the contents of that function with a few notes:


public static function createDraft($ct) {
$parent = Page::getByPath(COMPOSER_DRAFTS_PAGE_PATH);
$data['cvIsApproved'] = 0;
$p = $parent->add($ct, $data);
$p->deactivate();

$db = Loader::db();
$targetPageID = 0;
if ($ct->getCollectionTypeComposerPublishMethod() == 'PARENT') {
$targetPageID = $ct->getCollectionTypeComposerPublishPageParentID();
}
$db->Execute('insert into ComposerDrafts (cID, cpPublishParentID) values (?, ?)', array($p->getCollectionID(), $targetPageID));


I'd add some debugging statements here to see if you've got a valid page object with a valid collection ID.

So it looks like the $entry object isn't getting retrieved correctly here:
$entry = ComposerPage::getByID($p->getCollectionID());

// duplicate all composer blocks onto the new page and make them into new blocks


And here's where the problem is throwing the error:

$blocks = $entry->getComposerBlocks();
foreach($blocks as $b) {
$b2 = Block::getByID($b->getBlockID(), $p, $b->getAreaHandle());
$nb = $b2->duplicate($p);
$b2->deleteBlock();
$b2 = $nb;
}

return $entry;
}


you should try doing some debugging within that method, or hire a php to do so if you're not a programmer. Also try replicating the problem with non-jobs board pages to confirm that it's a core bug.
obaudains replied on at Permalink Reply
obaudains
Thank Tony, I have managed to sort it.

One final query:

I have created a recruitment user group that are redirected to the Jobs board page. There will be about 10 users in this group. What i would like to do is only display jobs that have been posted by the logged in user.

So where you have the 'owner' column they should all read the same name as the only jobs showing are the ones that the user has actually added.

If we can do it by user group id so it doesn't affect the website owner group or admin group that would be great.

I have looked at elements>dashboard>listing_search_results.php

Something like: If logged in and user group id = x then only display the logged in users job posts.

Really appreciate you help.
Oliver
Tony replied on at Permalink Reply
Tony
you may have to modify the code a little bit to do what you're asking.

firstly, the code you want to edit is in /blocks/tony_jobs_board_search/controller.php, inside of the view method.

You'll see various examples of how it's filtering the page list there already. Basically you'll just want to add a new filter there to filter by user, like this:

$pagelist->filterByUserID( $uID );

where $uID would be the logged in user's id. And i imagine you'd want to add some kind of switch around that so it only filters by user under certain circumstances.
obaudains replied on at Permalink Reply
obaudains
Sorry Tony,

I mean when the user is logged into the backend and views the jobs through the dashboard. (not the front end)

Are you able to tell me where to edit the code that brings back the search results please for the dashboard jobs list..?
Tony replied on at Permalink Reply
Tony
in that case take a look within /packages/tony_jobs_board/controllers/dashboard/jobs_board/controller.php, within the view method.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.